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
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

"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 ( 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...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20101028/7188c99d/attachment-0001.html>

More information about the es-discuss mailing list