JSFiddle - React, Tailwind, and code Playground
JavaScript
var obj1 = {
a: 'test1',
b: 'test2'
};
var obj2 = {
2: 'test1',
1: 'test2'
};
// max 32bit unsigned is 2,147,483,647
var obj3 = {
2147483649: 'test1',
2147483648: 'test2'
};
// max 64bit unsigned is 9,223,372,036,854,775,807
var obj4 = {
9223372036854770: 'test1',
9223372036854768: 'test2',
};
// != number < 2,147,483,647, order is not changed
console.log(Object.keys(obj1));
// < 2,147,483,647, order is changed
console.log(Object.keys(obj2));
// > 2,147,483,647, order is not changed in Firefox, but changed in Chrome
console.log(Object.keys(obj3));
// > 9,223,372,036,854,775,807, order is not changed in neither Firefox or Chrome
console.log(Object.keys(obj4));