Problem on List 'em all!


#1

Hello everybody,

I have a problem with this exercise. I declared a function called "list" but when I save the code it tells me that I have no function called list. how can solve that?

var friends = {
  bill: {
            firstName: "Bill",
            lastName: "Gates",
            number: "(206) 555-5555",
            address: ['One Microsoft Way','Redmond','WA','98052']
      },
  steve: {
       address: ['One Microsoft Way','Redmond','WA','98052']
      }
};

var list = function (friends) {
    for (var key in object) {
}

#2

your for loop:

for (var key in object) {

just abruptly ends? friends is the object you want to loop, log each key in friends object to console


#3

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