{Spam?} Re: (x) => {foo: bar}

Brendan Eich brendan at mozilla.org
Tue Jan 6 14:45:27 PST 2015


Isiah Meadows wrote:
>
> Okay: is this a valid statement/expression? I didn't think so, but I 
> may be wrong.
>
> ```js
> ({ foo(); bar(); })
> ```
>

It's a syntax error, in any JS repl or standard.

The Node repl only removes parens if it tries adding them first around 
braced input and that fails.

/be


More information about the es-discuss mailing list