In the following declaration, what should be the value of z?
let [z,y,z] = {0:0, 1:1, length: 2, 2:2};
should it be be 2 or undefined
undefined might be reasonable because it is an array pattern, and the source
object is only has two "array-like" elements
2 might be reasonable because the source object actually has a property named
"2"
Which alternative will be least surprising to JS programmers?
Allen
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss