Not recognizing my function 'list'


#1


Oops, try again. Did you create a function called list?

var friends = {
    bill: {
        firstName: "Bill",
        lastName: "Gates",
        number: "555-555-5555",
        address: ['One Microsoft Way', 'Redmond', 'WA',                       '98502']
    },
    steve: {
        firstName: "Steve",
        lastName: "Jobs",
        number: "555-555-5555",
        address: ['1 Infinite Loop Road', 'Cupertino', 'CA', '94102']
    }
};

var list = function (friends) {
    for (var key in friends) {
        console.log(friends[bill], friends[steve]);
    };
    
};


#2

Try removing your semicolons on your closing curly braces.
Read more here: https://www.codecademy.com/blog/78


#3

The guide is helpful, thank you.

I'm still getting the same error however, even after removing the semicolons.


#4

There are a couple more issues with your code there.
The first is that you actually need to call the function after you define it.

list(friends);

Secondly your console output isn't what's expected for the lesson.
I'll leave that one up to you.


#5

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