Frontend
Interviews
.dev
Problems
603. Closure in Loop with setTimeout
Easy
•
...
What does this log?
for
(
var
i
=
0
;
i
<
3
;
i
++
)
{
setTimeout
(
(
)
=>
console
.
log
(
i
)
,
0
)
}
What is printed?
0 1 2
3 3 3
2 2 2
0 0 0
Submit Answer
Reveal Answer
Select an option and submit your answer.
Next Problem
Auto-advance on correct answer