Using destructuring for function arguments

Brendan Eich brendan at mozilla.org
Sat May 31 13:40:28 PDT 2014


Nicholas C. Zakas wrote:
> ```
> function setCookie(name, value, { secure, path, domain, expires } = {}) {
>     console.log(secure);
>     // ...
> }
> ```
>
> Unfortunately, that resulted in a syntax error in Firefox.

Could you please file a bug against SpiderMonkey? Thanks,

/be


More information about the es-discuss mailing list