fail-fast object destructuring

Russell Leggett russell.leggett at gmail.com
Tue Jul 10 01:47:33 PDT 2012


Another thing that I was also thinking is that it might look a little nicer
if the ? was a post-fix instead of a pre-fix.

    let {first, last, company?} = contact;

I might be missing why this wouldn't work out, but it aesthetically just
looks right to me. It looks like the regex operator, and is also obviously
the position it would be in english.

- Russ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120710/68be46c4/attachment.html>


More information about the es-discuss mailing list