Created
October 8, 2017 23:16
-
-
Save Elbone/98633ef817fee78026b022cf95a74118 to your computer and use it in GitHub Desktop.
Loops in Javascript
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
// 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