Sriharsha Sistalam Agreed, but as mentioned, this is just a ice-breaker. If I’m lucky, the candidate will mention using let from ES 2015, and that is usually a great sign forward.
Mohit Chawla Good, that is exactly the point of that question. I didn’t mention that it printed 0–9, but rather what would it print. I expect JS developers to understand basic concepts like event loops, and understand how JS works under the covers!