Fun impossible Firefox JS challenge

Allen Wirfs-Brock allen at wirfs-brock.com
Thu Apr 12 12:37:11 PDT 2012


On Apr 12, 2012, at 12:23 PM, Brendan Eich wrote:

> Allen Wirfs-Brock wrote:
>> The IE9 console.log syntax error (I see it too) seem like a bug under any interpretation of the ES5.1 spec.
>> My second test case actually isn't very good. console.log(fals\u0065) is actually a reference error in chrome and safari.  This is the expected behavior when referencing an undeclared variable. So they are also de-keywordizing in that context.
> 
> Try running with 'var fals\u0065;' prepended -- have to test both ways.

var fals\u0065; console.log(fals\u0065);
var fals\u0065; console.log(fals\u0065);
var fals\u0065; console.log(fals\u0065);

Right chrome and safari log "undefined" in that case.  FF and IE9 syntax error out on the var declaration.

Allen



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120412/aeff8777/attachment.html>


More information about the es-discuss mailing list