126.96.36.199 Property enumeration order
The paragraph above specifies an interoperable property enumeration order for “simple” objects. Enumeration order becomes implementation dependent (and non-interoperable) if:
- The object inherits enumerable properties;
- the object has properties that are integer array indexes;
- you have used delete to delete existing properties of the object; or
- you have used Object.defineProperty()( §6.7 ) or similar methods to alter property attributes of the object.
Typically (but not in all implementations), inherited properties (see §6.2.2 ) are enumerated after all the noninherited “own” properties of an object, but are also enumerated in the order in which they were defined. If an object inherits properties from more than one “prototype” (see §6.1.3 )—i.e., if it has more than one object in its “prototype chain”—then the properties of each prototype object in the chain are enumerated in creation order before enumerating the properties of the next object. Some (but not all) implementations enumerate array properties in numeric order rather than creation order, but they revert to creation order if the array is given other non-numeric properties as well or if the array is sparse (i.e., if some array indexes are missing).
5.5 Loops | 101欢迎转载,转载请注明来自一手册:http://yishouce.com/book/1/31337.html