Member-only story
My Problem With ‘Tricky’ Javascript Interview Questions
I was reading this article yesterday and I didn’t do very well in answering the question that apparently 90% of Javascript developers get wrong. This is an interview question and I have to admit if I didn’t get a job because I didn’t answer this question correctly then I would be pretty annoyed.
I will expand on my reasons below but the basic premise of my answer is ‘this is not realistic of something you encounter in the field’ so why is it so important that it finds a place in a job interview?
When working in a codebase with many developers then rarely do you want ‘clever’ to be the favoured choice.
Why do these questions find a place in a job interview?
The best answer I can give for this is it helps reveal a candidates true understanding of the nuances of the Javascript language. Whilst this may be true on some levels does it give enough insight into the candidates relevant knowledge? It certainly could be interesting to hear the candidate speak out loud about how they are thinking about answering this question.
123[‘toString’].length + ‘123’ = ?
How they go about finding the length. How they concatenate a number and a string. Certainly interesting. Maybe a little insightful. Even a…
