i need to get real order of simple javascript abject, but i get incorrect answer from this code:
var Obj={"x":"z", "2":"a", "1":"b"};
for(i in Obj)
document.write(Obj[i]+"<br>");
I expect to see z
, a
, b
as answer, but i get b
, a
, z
See the code in action:
http://jsfiddle.net/gpP7m/