Hint
let creates a fresh binding per loop iteration — the solution to the classic var closure bug.
for (let i = 0; i < 3; i++) {
setTimeout(() => console.log(i), 0);
}0 1 2
Explanation: let creates a new binding per loop iteration. Each callback closes over its own independent i.
Key Insight: let creates a fresh binding per loop iteration — the solution to the classic var closure bug.