Nope. {a:1;} will work in REPL of Node.js. In source code of repl.js, it will 
wrap input with parentheses first, and if there is a syntax error, it then 
evaluate the code without parentheses. You can test {a:1} and {a:1;}, both of 
them works; the former one returns {a:1} while the latter one returns 1.

From: [email protected]
To: [email protected]; [email protected]
CC: [email protected]
Subject: Re: (x) => {foo: bar}
Date: Tue, 6 Jan 2015 06:59:52 +0300

 06.01.2015, 06:38, "Gary Guo" <[email protected]>: Though I am strongly 
negative, but there actually is such an implementation. The REPL of node will 
parse {a:1} as object literal while {a:1;} as block. Node.js REPL wraps all the 
statements in parentheses. Therefore `{a:1;}` becomes `({a:1;})` which is a 
syntax error.                                       
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to