1 of 8

for-in order

for stage 4

2 of 8

github.com/tc39/proposal-for-in-order

3 of 8

Recap

  • Reflect.ownKeys is ordered
  • for (a in b) {...} is not

4 of 8

Proposal

Make for-in ordered in

the common case.

5 of 8

This also affects Object.keys, JSON.stringify, etc.

6 of 8

Proposal:

7 of 8

8 of 8

Stage 4?