Boolean shortcuts

Herby Vojčík herby at mailbox.sk
Wed Jan 4 05:57:31 PST 2012


-----Pôvodná správa----- 
From: François REMY
Sent: Wednesday, January 04, 2012 2:27 PM
To: Herby Vojčík ; es-discuss at mozilla.org
Subject: Re: Boolean shortcuts

BTW, I think the reason of your inconsistency is a bug : eval("{}") should
return undefined, as in IE9. It seems that node.js has a special case for
{}, probably to avoid a common mistake. Or there's a bug in the parser, I
don't know.
===

Well, it was not really eval("..."), I ran all the expressions in the REPL 
(the eval("{}") does return undefined). Though I think even in REPL (which 
is implemented by compiling a piece of script In v8 and running it, not 
directly though eval, but using v8 API) there should not be such 
inconsistency, either...

Herby



More information about the es-discuss mailing list