for (var i = 0; i < 3; i++)
operations:
setTimeout(..., 100)
$i = 3$
#0 $\text{() } \Rightarrow \text{console.log}(i)$
#1 $\text{() } \Rightarrow \text{console.log}(i)$
#2 $\text{() } \Rightarrow \text{console.log}(i)$
for (let i = 0; i < 3; i++)
operations:
setTimeout(..., 100)
$i_0 = 0$
$i_1 = 1$
$i_2 = 2$
#0 $\text{() } \Rightarrow \text{console.log}(i_0)$
#1 $\text{() } \Rightarrow \text{console.log}(i_1)$
#2 $\text{() } \Rightarrow \text{console.log}(i_2)$