List 'em all!


#1


https://www.codecademy.com/courses/javascript-beginner-en-3bmfN/0/6?curriculum_id=506324b3a7dffd00020bf661

Oops, try again. It looks like your list function isn't printing the right output.


var friends = {
   Bill: {
       firstName: "Bill",
       lastName: "Gates",
       number: 203940323,
       address: ['One Microsoft Way','Redmond','WA','98052']
       },
   Steve: {
       firstName: "Steve",
       lastName: "Jobs",
       number: 245433423,
       address: ['Two Apple Way','Richmond','MA','99872']
   },
   Maria: {
       firstName: "Maria",
       lastName: "Papapostolou",
       number: 2309349023,
       address: ['Twenty One Dionissou Avenue','Rea','Drossia','14674']
       },
  Kaliopi: {
       fistName: "Kaliopi",
       lastName: "Papadimitrios",
       number: 235434565,
       address: ['Twenty Six Iroon st','N.Erithrea', 'Athens'
,'14671']
      }
    };
    
    
    var list = function(friends){
for (var key in friends) {
    console.log(friends[key].firstName)
   }

   }
   list(friends);


#2

You should just console.log (key); which you had looped for.

Hope this helps! :smile: