(x) => {foo: bar}

Rick Waldron waldron.rick at gmail.com
Tue Jan 6 16:11:48 PST 2015

On Tue Jan 06 2015 at 4:53:05 PM Isiah Meadows <impinball at gmail.com> wrote:

> Okay: is this a valid statement/expression? I didn't think so, but I may
> be wrong.
> ```js
> ({ foo(); bar(); })
> ```
That's not valid for any grammar in up to and including ES6.

To make it valid, pick one, but not both:

- Remove the parens and it's valid block syntax.
- Remove everything inside the curlies, except for the word `foo` and it's
valid object literal syntax, containing an identifier reference for some
binding named `foo` (property short hand).


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

More information about the es-discuss mailing list