A Tricky JavaScript Interview Question Asked by Google and Amazon(medium.com)
medium.com
A Tricky JavaScript Interview Question Asked by Google and Amazon
https://medium.com/coderbyte/a-tricky-javascript-interview-question-asked-by-google-and-amazon-48d212890703
3 comments
Debugging is a skill that will definitely be used on the job, and this is a stripped-down example of something that you'll definitely encounter while working in JavaScript (or any language with mutable closures).
How would you ask about this issue in interviews?
How would you ask about this issue in interviews?
This isn't really a tricky question who understands how JS works. If a person has not experienced this situation of a function call (closures) within a loop, I'd suspect he has not much practical experience.
It's much more difficult to understand this theoretically than when encounter this while you code.
It's much more difficult to understand this theoretically than when encounter this while you code.
"Tricky" is the correct word here and tricky interview questions are stupid.