13

Times I have run into event loop / closure related issues in my 10+ years of JavaScript app development: 0

Times I have run into event loop / closure related issues in my 10+ years of interviewing: Uncaught RangeError: Maximum call stack size exceeded

SHEESH

Comments
  • 1
    Usually code written in interviews is being tested and debugged for the first time in front of you in a high pressure environment so it stands to reason basic mistakes will pop up unlike code written with leisure and tested well enough to be reviewed by peers.
  • 2
    @JKyll but this is exactly my point, code I ship to production is almost always tested and / or reviewed, so why is stuff like this ALWAYS asked in interviews? It doesn't reflect how you work and reason as an employee (which is what interviews should focus on in my opinion)

    yes, obviously I know the weird quirks of javascript, but i never learned them explicitly or know how to explain them well
  • 3
    I had one interview where they wanted to test me on the pitfalls of parsing ints in JS, and I mentioned you should provide the radix as the second argument to avoid ambiguity, and to use IsNaN to assert the result since NaN is never equal to NaN. Then I got a little unsure about whether it was Int.Parse or parseInt, but wait JS/ES doesn't have an "Int" type, so I'd need to look it up. The interview would not continue until I could confirm my final answer without googling.

    Maybe their business was focused on making web based solutions without access to the web. I don't know.
Add Comment