1

Since every JavaScript developer should know, that an object's order is not guaranteed to be the same in all circumstances, we are told to use arrays (of objects) whenever the order of children is sensible.

But every time I inspect an (unordered) object in the browser's devtools, I realize the order is exactly as I would expect it (assuming that JS objects behave like ordered maps).

When or why may the order of the properties change?

In different browsers/JS-interpreters? At different runtimes because of some memory optimizations, that I don't have any clue of?

Can anybody clarify, when the order of the object's property may change?

EDIT:

I have read the questions

But I cannot find information about when it is not safe to rely on the order.

4

0 に答える 0