Software Engineer
Asynchronous Loop Output
What will be the output of the following code? Analyze the implications of the setTimeout function on the variable 'i'.
function foo() { for (var i = 0; i < 10; i++) setTimeout(() => console.log(i), 1000); } foo();This question was asked in
ServiceNow Software Engineer Interview Experience
The ServiceNow Frontend Software Engineer (IC2) interview process was quite extensive, involving multiple rounds and a mix of technical problem-solving. The first round focused heavily on JavaScript concepts and included questions on output interpretation, event loop mechanics, and basic algorithmic challenges. Subsequent rounds introduced system design discussions, demonstrating a need for both technical proficiency and design thinking. Overall, the interview experience at ServiceNow is rigorous, emphasizing strong coding skills, design principles, and a solid understanding of web technologies.