Skip to content

Instantly share code, notes, and snippets.

@Elbone
Created October 8, 2017 23:16
Show Gist options
  • Save Elbone/98633ef817fee78026b022cf95a74118 to your computer and use it in GitHub Desktop.
Save Elbone/98633ef817fee78026b022cf95a74118 to your computer and use it in GitHub Desktop.
Loops in Javascript
// My preferred method
let obj = {"one" : 1, "two" : 2, "three": 3 }
for (let k of Object.keys(obj)) {
console.log(k, obj[k])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment