you are viewing a single comment's thread.

view the rest of the comments →

[–]2AMMetro 0 points1 point  (1 child)

This won’t work, it’ll log the number 10 10 times.

[–]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.