JavaScript has set of rules when it comes to order object properties. There is strange example for me.
When timestamp in milliseconds is used as object property key, then ordering doesn't work.
When timestamp in seconds is used as object property key, then ordering works.
var objS = {
1600333200: 'a',
1600419600: 'b',
1600338600: 'c'
};
console.log('seconds', JSON.stringify(objS));
var objMs = {
1600333200000: 'a',
1600419600000: 'b',
1600338600000: 'c'
};
console.log('milliseconds', JSON.stringify(objMs));
Are there any explanation?