Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
simonbw
· 8y ago · 0 comments
I believe in es6 Object literals are guaranteed to keep their ordering, and Object.keys() will iterate through them in the order defined.
Comments
[–]
denpaDawn
8y ago
The ordering of Object.keys() is equal to insertion order of the keys into the object. So if you have an Object generation function, it can insert the keys in the proper order (and take advantage of stuff like v8 hidden classes)
http://2ality.com/2015/10/property-traversal-order-es6.html