Created
July 30, 2013 19:05
-
-
Save PAEz/6115848 to your computer and use it in GitHub Desktop.
Short, quick way to iterate over an Objects keys.
This file contains 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
var obj = { | |
one: null, | |
two: undefined, | |
three: 3 | |
} | |
for (var i = 0, keys = Object.keys(obj), key; key = keys[i]; i++) { | |
console.debug(obj[key]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment