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

var y = x + f

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 = 


Cover of JavaScript: The Definitive Guide, 6th Edition


example of error