← All articles

JavaScript

1 article

Why Your setTimeout Loop Logs the Wrong Number

A classic closure gotcha with var inside loops and setTimeout, and how let fixes it.

Intermediate