What is wrong with my code? 9/30.Getting In Timate


#1


.


https://www.codecademy.com/courses/objects-ii/1/4


Output seems ok , but it shows error


var nyc = {
    fullName: "New York City",
    mayor: "Bill de Blasio",
    population: 8000000,
    boroughs: 5
};
for(var property in nyc){
  console.log(nyc[property]);  
    }

Oops, try again. It looks like you didn't print nyc's fullName
. remove the three backticks above>


#2

You are already looping for property to print out each key. All you need do is:

console.log(property);

I hope this helps! :wink:


#3

Thanx.It solves he problem.


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.