Skip to content

Instantly share code, notes, and snippets.

@stevencombs
Last active December 24, 2015 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevencombs/6846187 to your computer and use it in GitHub Desktop.
Save stevencombs/6846187 to your computer and use it in GitHub Desktop.
// Javascript Getting Started with Programming
// A Codecademy Javascript (Getting IN-timate) assignment
// Dr. Steven B. Combs, coding novice
var nyc = {
fullName: "New York City",
mayor: "Michael Bloomberg",
population: 8000000,
boroughs: 5
};
// Print all the properties of the object nyc
for (var property in nyc) {
console.log(property);
}
// Print the value of nyc's properties
for (var property in nyc) {
console.log(nyc[property]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment