So I have some code like this:
var obj = {
something: 10,
1 : 15,
2 : 20,
3 : 25
};
for(var i in obj) {
console.log(i);
}
That returns: 1, 2, 3, something
Why is the first element moved to the end?
So I have some code like this:
var obj = {
something: 10,
1 : 15,
2 : 20,
3 : 25
};
for(var i in obj) {
console.log(i);
}
That returns: 1, 2, 3, something
Why is the first element moved to the end?