6. List 'em all error


#1

when i do:

`var friends = {};

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

friends.steve = {
firstName: "Steve",
lastName: "Jobs",
number: "(408) 555-5555",
address: ['1 Infinite Loop','Cupertino','CA','95014']
}

var list = function(friends) {
for (var key in object) {
console.log(object[key])
}
}`

it says: Oops, try again. Did you create a function called list?
and there are no errors in the code though


#2

var friends = {
bill:{
firstName: "Bill",
lastName: " ",
number: " ",
address: [" "]
},

steve:{
    firstName: "Steve",
    lastName: " ",
    number: " ",
    address: [" "]
}

};

var list = function(friends){
for(var key in friends){
console.log(key);
}
}


#3

@meme8383
there is an error in your list definition.you cant use object name as your parameter like var list=function(friends) this is wrong.you can use like var list=function(xxx) and you also havent used same parameter in for loop.i.e for(var key in xxx).