I am following a code academy tutorial and i am finding this difficult.
The assignment is the following:
Use a for-in loop to print out all the properties of nyc.
var nyc = {
fullName: "New York City",
mayor: "Michael Bloomberg",
population: 8000000,
boroughs: 5
};
// write your for-in loop here
for (var in nyc){
console.log(population);
}
No comments:
Post a Comment