6: list 'em all HELP!


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) {


Change here the code:

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

For key you can type what you want.


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 =)


thank you! it worked!