Created
August 3, 2014 00:49
-
-
Save mannuelf/a595868d1c3a2653061d to your computer and use it in GitHub Desktop.
List ALL the Properties!
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 nyc = { | |
fullName: "New York City", | |
mayor: "Bill de Blasio", | |
population: 8000000, | |
boroughs: 5 | |
}; | |
// write a for-in loop to print the value of nyc's properties | |
for(var x in nyc) { | |
console.log(nyc[x]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment