Expert
Consider these two loops:
for (var i = 0; i < 3; i++) {
setTimeout(()=> console.log(i), 1);
}
for (let i = 0; i < 3; i++) {
setTimeout(()=> console.log(i), 1);
}
What are the expected outputs?
Author: Clément DevosStatus: PublishedQuestion passed 261 times
Edit
Similar QuestionsMore questions about Javascript