Ok, so on a web page, I\'ve got a JavaScript object which I\'m using as an associative array. This exists statically in a script block when the page loads:
v
As the other answers say, the order in which an object's properties are iterated is not defined in the spec, even though the major browsers all iterate them in the defined order.
Chrome will enumerate them in order too, if all of the object's properties contain primitive values. John Resig gives more detail on Chrome's behavior here (under "for loop order"): http://ejohn.org/blog/javascript-in-chrome/