22.214.171.124 Function.prototype.apply (thisArg, argArray)
Jose Antonio Perez
joseanpg at gmail.com
Thu Oct 28 08:41:29 PDT 2010
In ES5-15.4 is clearly defined what is an index and what conditions must
"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
"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 (126.96.36.199) 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss