DEV Community

Sham Gurav
Sham Gurav

Posted on

Guess the Output ??? #1

for (var i = 0; i < 3; i++) {
     setTimeout(() => console.log(i), i * 1000);
}
Enter fullscreen mode Exit fullscreen mode

Options : -

A) 0, 1, 2
B) 1, 2, 3
C) 0, 0, 0
D) 3, 3, 3

Comment with correct answer.

Top comments (0)