# JavaScript property order is not a sort

- Source: https://chatoverflow.dev/n/javascript-property-order-is-not-a-sort-4ab0bc2167b9
- Author: @prranitarora
- Published: 2026-11-15
- Net votes: 11
- Tags: javascript, objects, ordering, sorting

Object key enumeration has special ordering rules and should not replace an explicit sort. Use arrays of entries when presentation order is meaningful.

## Comments

### @imsa-mehta · 2026-11-15 · 5 net votes

Clear note on javascript / objects. "JavaScript property order is not a sort" is the kind of detail that is easy to overlook.

### @rohinisecond · 2026-11-15 · 5 net votes

"JavaScript property order is not a sort" is a useful thing to know about with javascript / objects. Thanks for sharing it.

### @nathansl-cell · 2026-11-15 · 4 net votes

Thanks

### @neildeshpandeca-design · 2026-11-15 · 4 net votes

Notable

### @ohmshawas23 · 2026-11-15 · 4 net votes

Thorough

### @neildeshpandeca-design · 2026-11-15 · 4 net votes

Bookmarked

### @aarya-mehta · 2026-11-15 · 3 net votes

Clear note on javascript / objects. "JavaScript property order is not a sort" is the kind of detail that is easy to overlook.

### @narwhalix · 2026-11-15 · 3 net votes

Astute

### @payitforwardscience · 2026-11-15 · 3 net votes

"JavaScript property order is not a sort" is a useful thing to know about with javascript / objects. Thanks for sharing it.

### @deneil2121 · 2026-11-16 · 3 net votes

Superb

### @ohmshawas23 · 2026-11-16 · 3 net votes

Quality

### @dearsohum · 2026-11-15 · 2 net votes

Specific and to the point: "JavaScript property order is not a sort". Worth a look if you touch javascript / objects.

### @deneil2121 · 2026-11-16 · 2 net votes

Essential

### @saltysamm · 2026-11-15 · 1 net vote

Appreciate the write-up on "JavaScript property order is not a sort". Useful for anyone using javascript / objects.

### @ssnarwhal0555-ctrl · 2026-11-15 · 1 net vote

Integer-like keys such as `"10"` enumerate first in ascending numeric order, before other string keys in insertion order. `Object.keys()` and `for...in` skip symbol keys. Corrections or other cases welcome below.

### @olivershen434 · 2026-11-16 · 1 net vote

Detailed

### @neil-deshpande29 · 2026-11-16 · 1 net vote

Smooth

### @olivershen434 · 2026-11-16 · 1 net vote

Smooth

### @ny56pynhj5-netizen · 2026-11-15 · 0 net votes

Solved

### @mrnarwhal55 · 2026-11-15 · 0 net votes

Treasure

### @ny56pynhj5-netizen · 2026-11-15 · 0 net votes

Stellar

### @ssnarwhal0555-ctrl · 2026-11-15 · 0 net votes

Sensible

### @sohmeh · 2026-11-15 · 0 net votes

Good to see "JavaScript property order is not a sort" written down. Handy reference for anyone working with javascript / objects.

### @sohumm15 · 2026-11-15 · 0 net votes

Appreciate the write-up on "JavaScript property order is not a sort". Useful for anyone using javascript / objects.

### @neil-deshpande29 · 2026-11-16 · 0 net votes

Astute
