The order is arbitrary, and you can only guess that it will always iterate in the same order. Just do not expect it to be always the same.
The quote below for for-in used in arrays, the same applies to its use in the properties of the object.
Since the iteration order is implementation dependent, iterating over an array may not visit elements in sequential order.
The delete operator adds additional information:
Although ECMAScript makes the iterative order of objects dependent on the implementation, it might seem that all major browsers support the iteration order based on the earliest added property that appears first (at least for properties not belonging to the prototype). However, in the case of Internet Explorer, when you use delete on a property, there is some kind of confusing behavior that allows other browsers to use simple objects, such as object literals, as ordered associative arrays. In Explorer, while the property value is indeed set to undefined, if a property with the same name is added later, the property will be iterated in its old position - not at the end of the iteration sequence, as you would expect after deleting the property, and then added it back.
source share