1
2
3
4
5
6
7
8
9
10
11
12
13
14
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 property in nyc)
{
console.log(nyc[property]);
}
// object.property=object["property"]
console.log(nyc.fullName);
console.log(nyc["fullName"]);