Skip to content

Instantly share code, notes, and snippets.

@MiguelQueiroz
Created June 27, 2014 10:19
Show Gist options
  • Save MiguelQueiroz/9a585f3bf585eb19e0b7 to your computer and use it in GitHub Desktop.
Save MiguelQueiroz/9a585f3bf585eb19e0b7 to your computer and use it in GitHub Desktop.
Object.keys functionality for Javascript
Object.keys = Object.keys || function(o) {
var result = [];
for(var name in o) {
if (o.hasOwnProperty(name))
result.push(name);
}
return result;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment