Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Object.keys - Javascript
Object.keys = function (obj, k) {
k=[];
for (o in obj) {
obj.hasOwnProperty(obj[o]) && (k[k.length]=o);
}
return k;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment