Expression Closures in JS 1.8.1

Michael Haufe tno at
Mon Aug 3 09:42:17 PDT 2009

The documentation is a little sparse on the Mozilla page:
and the wiki doesn't have a page created for it yet on the subject, so I
have a generic question on the grammar:

Is their an ambiguity that prevents the following from being a valid syntax?

function foo();

being the equivalent of

function foo(){ return };

Also, how is it that the following is not misinterpreted to "function() {
return false, true; }"?

addEventListener("click", function() false, true)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list