543988 (1) [Avatar] Offline
#1
section 1.1.4 makes the point that using the closure in the foreach ensures proper scoping of "item", but doesn't the "bad" version using for(let item ...) work just as well - I would have thought that the "let" as opposed to "var" ensures exactly the same thing.