News for hackers. Stuff that matters.
Re:The Birth and Death of JavaScript [video] by codeflo on Friday April 18, 2014 @03:32AM (#7608299)
Being pedantic: it's NOT semicolon insertion. Your actual point is correct, the {} is an empty block statement, and the +[] is a separate expression statement. It's equivalent to "{} 0".

However, semicolon insertion is only triggered when there's a newline at a position where there would otherwise be a syntax error. Here, neither is the case: blocks don't have to be terminated by semicolon (so no syntax error), and there's no newline in the source code!

There are no comments on this comment yet.