es6 이전 javascript에서 객체는 순서를 보장하지 않는다.

https://stackoverflow.com/questions/5525795/does-javascript-guarantee-object-property-order/23202095

4.3.3 Object An object is a member of the type Object. It is an unordered collection of properties each of which contains a primitive value, object, or function. A function stored in a property of an object is called a method.

http://www.ecma-international.org/publications/files/ECMA-ST-ARCH/ECMA-262, 3rd edition, December 1999.pdf

그러나 es6 이후 주요 벤더들은 위와 같은 공통된 구현 방식을 채택했다.

https://stackoverflow.com/questions/5525795/does-javascript-guarantee-object-property-order/38218582#38218582

getOwnPropertyNames(), keys() 차이

https://stackoverflow.com/questions/22658488/object-getownpropertynames-vs-object-keys

위의 규칙으로 순서를 보장하는 메소드

보장하지 않는 메소드