Skip to content

Instantly share code, notes, and snippets.

@PAEz
Created July 30, 2013 19:05
Show Gist options
  • Save PAEz/6115848 to your computer and use it in GitHub Desktop.
Save PAEz/6115848 to your computer and use it in GitHub Desktop.
Short, quick way to iterate over an Objects keys.
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