The Loop-Closure Gotcha

The single most famous JavaScript interview gotcha — do you actually know why var prints 3, 3, 3 in a loop but let prints 0, 1, 2?

7 questions · 20 minutes

JS Foundations — Concept Checks

Tech Session

The Loop-Closure Gotcha

Preview

The single most famous JavaScript interview gotcha — do you actually know why var prints 3, 3, 3 in a loop but let prints 0, 1, 2?

7Questions
20 minTime limit
60%Passing score
Unlimited — latest score keptAttempts
Randomized optionsOne at a time