Ah right, well caught :)

for arrays I forgot it's possible to do:

`var a=[1,2,3,4,5,6], {[a.length-1]: last}=a; last`

2016-10-04 15:33 GMT+02:00 Jason Orendorff <[email protected]>:

> On Tue, Oct 4, 2016 at 7:12 AM, Cyril Auburtin <[email protected]>
> wrote:
>
>> I didn't understand everything discussed above, but to me, the only
>> asymmetry between head and tail destructuring is for infinite iterators:
>>
>> `var [x] = neverEndingIterator` vs `var [...a, x] = neverEndingIterator
>> // fails`
>>
>
> Read the post just before yours. Caitlin pointed out another difference.
>
> -j
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to