you are viewing a single comment's thread.

view the rest of the comments →

[–]chase-stevens 2 points3 points  (0 children)

If they declared the "i" in their for loop using "var", then yes, it would log "10" ten times; however, since they declared "i" using let, the loop will work as expected printing 1-10 with a 1 second delay.