On Wed, Oct 25, 2017 at 1:15 PM, Sebastian Malton
<[email protected]> wrote:
>
> I didn't mean that part when I said multiple levels. I meant
> the following
> ```
> const abc = { { bcd, cde, efg: {qnc} } = obj};
>
> ```
I was responding to your initial assertion in your first message, which
didn't show that form. It just said
> Currently you can do the following
>
> `const {abc, xyz, qnc} = obj;`
>
> However if you want to go more than one level deep then you have to do it
again for each level.
>
> ...
>
> I therefore propose the ability to do the following
>
> `const {abc, xyz, qnc.awj} = obj;`
>
> And this would create the variables 'abc'', 'xyz', 'awj' with the
> values from obj.
I was pointing out how you can do that without having to "do it again."
Perhaps you could clarify what you're actually proposing. Your first
message talked about individual variables for the parts of `obj`;
subsequently you seemed to be talking about creating a new object
(combining object initializers with destructuring)...?
-- T.J. Crowder
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss