Proposal: syntactic sugar for extracting fields from objects

Григорий Карелин grundiss at gmail.com
Mon May 27 13:44:42 UTC 2019


> Is the expected result for ```obj``` to be defined as a variable and
```firstName``` and ```lastName``` to not be defined as variables?
Exactly

As you mentioned above, we may use default value while destructuring to
achieve the same result, but it looks quite unobvious and creates extra
variables
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20190527/c4b84a53/attachment.html>


More information about the es-discuss mailing list