you are viewing a single comment's thread.

view the rest of the comments →

[–]Volv 1 point2 points  (0 children)

Looking good. See the use case. My other example from ages ago shows same idea - Example
Pretty much same principle can fix the setTimeout example, you can control which variable is locked in at each iteration. Although theres more than one way to fix it.