In ES5 all assignments are evaluated following this formula: get a reference via evaluating LHSget a value through evaluating RHSassign the value to the reference However in the current draft, destructuring assignment are evaluated in another order which is (as seen in section 12.13.3) get a value via evaluating RHSparse LHS patternbring parts of RHS into the LHS subpatterns this causes an inconsistency that in expression `[f().x] = [g()]`, g is called BEFORE f. That is weird, and differ from `f().x = g()` where g is called after f.
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

