6: list 'em all HELP!


#1

why doesnt this work? it says:"Oops, try again. Did you create a function called list?" but I clearly did. this is what I put:
var friends = {
bill: {
firstName: 'Bill',
lastName: 'Gates',
number: '(555) 555-555',
address: ['One Microsoft Way','Redmond','WA','98052']
},
steve: {
firstName: 'Steve',
lastname: 'Jobs',
number: '(555) 555-555',
address: ['my house','lhc','AZ','86504']
}
};
var list = function (friends) {
for (var firstName in friends) {
console.log(friends[firstname])
};
};


#2

Change here the code:

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

For key you can type what you want.


#3

The first part of the function is correct:
var list = function (friends) {

But you want to replace firstName with list in the for part:
for (var list in friends) {

Finally, once this is sorted, you only need to log the list, like so:
console.log (list);

Hope this helps =)


#4

thank you! it worked!