Arcade

Guess the output. One JavaScript snippet a day that doesn't do what it looks like.

Resets at midnight UTC.
guess the output · daily

What does this log?

for (var i = 0; i < 3; i++) {
  setTimeout(() => console.log(i), 0);
}

Every puzzle12

The whole bank, with the answer and the reason why.