Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
object enumeration test
function lineate(obj){
var arr = [], i;
for (i in obj) arr.push([i,obj[i]].join(':'));
console.log(arr);
}
var obj = { a:1, b:2, c:3, "123":'xyz' };
/* log1 */ lineate(obj);
obj.a = 4;
/* log2 */ lineate(obj);
delete obj.a;
obj.a = 4;
/* log3 */ lineate(obj);
@dvdrtrgn
Owner

// Safari & Firefox
// ["a:1", "b:2", "c:3", "123:xyz"]
// ["a:4", "b:2", "c:3", "123:xyz"]
// ["b:2", "c:3", "123:xyz", "a:4"]

// Chrome (still!) & Opera
// ["123:xyz", "a:1", "b:2", "c:3"]
// ["123:xyz", "a:4", "b:2", "c:3"]
// ["123:xyz", "b:2", "c:3", "a:4"]

@saik0

// IE 9, 10
// ["123:xyz", "a:4", "b:2", "c:3"]
// ["123:xyz", "a:4", "b:2", "c:3"]
// ["123:xyz", "a:4", "b:2", "c:3"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.