O'Reilly logo
  • Nivan Morgan thinks this is interesting:

var y = x + f
(a+b).toString()

But the parentheses on the second line of code can be interpreted as a function invocation of f from the first line, and JavaScript interprets the code like this:

var y = 
		

From

Cover of JavaScript: The Definitive Guide, 6th Edition

Note

example of error