Object Key Order and Reflect.ownKeys
const obj = { 11: 'eleven', 23: 'twenty-three', 1: 'one', 2: 'two', '-1': 'negative 1' };
console.log(Reflect.ownKeys(obj))
I noticed that for in..
over an object was giving me weirdly consistent results across all browsers the other day and stumbled upon this.
Great news, but it’s Reflect.ownKeys
for me… now that IE11 is dying/dead.