4 ms·
Small note, the JS objects are in fact ordered. The lack of determinism caused issues between browsers so the spec now defines the following order: 1. Integer
by demurgos 8y ago
Small note, the JS objects are in fact ordered. The lack of determinism caused issues between browsers so the spec now defines the following order:
1. Integer indexes (string keys) in ascending numeric order
2. Other string keys (non-integer indexes) in insertion order
3. Symbols in insertion order
https://www.ecma-international.org/ecma-262/#sec-ordinary-object-internal-methods-and-internal-slots-ownpropertykeys https://www.ecma-international.org/ecma-262/#sec-ordinary-ob...