22.214.171.124 Function.prototype.apply (thisArg, argArray)
Jose Antonio Perez
joseanpg at gmail.com
Thu Oct 28 10:45:53 PDT 2010
> If we assume “Array like object” is an object that can serve as the this
> value of the Array.prototype methods then pretty much any object is “Array
> like”. The Array.prototype methods generally iterate based upon the value
> of the this object’s length property. They use ToUint32 to interpret length
> as a positive value in the 0..2^32-1 range. If the this object does not
> have a length property, [[Get]] will return undefined which ToUint32
> converts to 0. All other non-numeric values also convert to values in the
> 0..2^32-1 range.
> So objects without a length or with a length value for which ToNumber
> produces NaN are treated as 0 length “arrays”.
Actually we are discussing two possible positions:
- Any object is an Array-like-object
- An Array-like-object is an object that has a integer length property that
in interval [0,2^32)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss