Destructuring default values with empty strings

John Lenz concavelenz at gmail.com
Fri Apr 1 02:40:47 UTC 2016


I think an appropriate map call will let you do anything you want here.
On Mar 27, 2016 4:51 AM, "Cyril Auburtin" <cyril.auburtin at gmail.com> wrote:

> when doing  let [tag = 'cat', ...cls] = '.foo.bar'.split('.')
>
> I'd find it more logical to use the default value for all falsy values
> like an empty string '' for the tag variable.
>
> but the default value isn't applied there
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160331/feaf8d40/attachment.html>


More information about the es-discuss mailing list