Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
_0w8t
on July 31, 2018
|
parent
|
context
|
favorite
| on:
Why the New V8 Is So Damn Fast
In JS for-in loop enumerates keys in the insert order. So {x,y,z} is different from {z,x,y}
mort96
on July 31, 2018
[–]
AFAIK, that's not true; the spec doesn't guarantee that it iterates in insertion order, it's just how it's commonly implemented in browsers.
topaxi
on July 31, 2018
|
parent
[–]
Nope, they should be iterated in their defined order:
https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys
I think they added this with ES2015.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: