Skip to content

Instantly share code, notes, and snippets.

@igorescobar
Created July 6, 2013 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igorescobar/5939998 to your computer and use it in GitHub Desktop.
Save igorescobar/5939998 to your computer and use it in GitHub Desktop.
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