Deconstructing assignment and reader/modify/write operands

Allen Wirfs-Brock allen at
Tue Sep 24 08:42:49 PDT 2013

On Sep 23, 2013, at 12:05 PM, Oliver Hunt wrote:

> I am reading the spec and it looks (to me at least) like we expect [a,b,c] += [1,2,3] to be equivalent to a+=1; b+=2; c+=3 — is that correct or have i misread something?

No, see 

Destructuring is only  checked for in the  LHS = RHS case.

The LHS AssignmentOperator RHS case is just like ES5 and doesn't do any destructuring.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list