Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// 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
You can’t perform that action at this time.