In ES5-15.4 is clearly defined what is an index and what conditions must verify length
"A property name P (in the form of a String value) is an array index if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 2^32-1" "Every Array object has a length property whose value is always a nonnegative integer less than 2^32" Also in the construction of an array with explicit length (15.4.2.2) that condition is checked with a possible RangeError exception "If the argument len is a Number and ToUint32(len) is equal to len, then the length property of the newly constructed object is set to ToUint32(len). If the argument len is a Number and ToUint32(len) is not equal to len, a RangeError exception is thrown." As Asen suggests would be interesting to define explicity the concept of "Array like object", demanding the fulfillment of such conditions. Jose
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

