▲ Property order is predictable in JavaScript objects since ES2015 at www.stefanjudis.com▼12 up and 0 down, posted by stefanjudis 2612 days ago 2 comments
CrossEye 2610 days ago. link 4 points ▲ ▼As the article shows, though, predictable does not mean anything like logical! Please don't count on this for anything serious. The thought that `{x: 1, y: 2}` has different behavior than `{y: 2, x: 1}` is fairly horrifying.
tracker1 2612 days ago. link 1 point ▲ ▼This is why you should use a normalization before serializing and doing any comparisons, unless relying on the order.
As the article shows, though, predictable does not mean anything like logical! Please don't count on this for anything serious. The thought that `{x: 1, y: 2}` has different behavior than `{y: 2, x: 1}` is fairly horrifying.