There are some caveats. This, for example, would not work as expected:
foo()
[1,2,3].forEach(bar)
Automatic semicolon insertion wouldn't work here, because the bracket could be a continuation of the last line. The same goes for parentheses at the beginning of a line.Source: http://blog.izs.me/post/2353458699/an-open-letter-to-javascr...