Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

object enumeration test

View lineate.js
1 2 3 4 5 6 7 8 9 10 11 12
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);
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 commented

// 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.