Expression Closures in JS 1.8.1

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


The documentation is a little sparse on the Mozilla page:
https://developer.mozilla.org/en/New_in_JavaScript_1.8#Expression_closures
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: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20090803/ec412150/attachment.html>


More information about the es-discuss mailing list