Default values of destructured arguments?

Bradley Meck bradley.meck at gmail.com
Fri Nov 28 07:45:02 PST 2014


I might be missing something but it appears in es6 you cannot default a
destructured argument?

```
function foo({d}={d:1}) {

}
```

and

```
function foo({d=1}) {

}
```

don't seem to fall into the syntax, are there plans for this in the future
or something that prevented this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141128/74c0da6b/attachment.html>


More information about the es-discuss mailing list