>
>
> ```
> function foo({d}={d:1}) {
>
> }
> ```
>
> and
>
> ```
> function foo({d=1}) {
>
> }
> ```
>Both are allowed in ES6. The second will throw an error if no actual parameter is provided to the function, however. (Because you haven't specified a default for the parameter.)
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

