In JavaScript there’s no guarantee for the order of the object keys. You shouldn’t count on that even though the de-facto behavior in most engines is to keep the order and recently ES6 touched upon the order. This is particularly troublesome for for..in or Object.keys if you rely on their order.

Written by

Knowledge Worker, MSc Systems Engineering, Tech Lead, Web Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store