Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
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.
-
@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 -
ltlian21883yI 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.
Related Rants
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
rant
js
interviews