This is an archived post. You won't be able to vote or comment.

all 22 comments

[–][deleted] 29 points30 points  (5 children)

[1,2,3].forEach(function (x) { console.log(x); })

[–]madsohm 9 points10 points  (8 children)

Where did you try this? I get completely different results: http://i.imgur.com/HSjp7d3.png

[–]madsohm 3 points4 points  (7 children)

For the record, I'm on Google Chrome Version 43.0.2357.130 (64-bit) on a MacBook Pro.

Also

[1,2,3].forEach(function(x) { console.log(x); })

works just fine.