Created
June 27, 2014 10:19
-
-
Save MiguelQueiroz/9a585f3bf585eb19e0b7 to your computer and use it in GitHub Desktop.
Object.keys functionality for Javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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