List function not working


#1


https://www.codecademy.com/courses/javascript-beginner-en-3bmfN/0/6?curriculum_id=506324b3a7dffd00020bf661#


For some reason, it's saying that I did not define the list function. Could someone please tell me what I'm doing wrong?


var friends = {
    bill: {
        firstName: "Bill",
        lastName: "Smith",
        number: "(999) 999-999",
        address:['1500 Street Street','San Antonio', 'TX', '39303']},
    steve: {
        firstName: "Steve",
        lastName: "Rogers",
        number: "(777) 777-7777",
        address: ['1390 Road Road', 'Atlanta','GA',  '40958']}
};
var list = function (friends)  {
    for(var x in object) {console.log(x);}

};


#2

here:

for(var x in object)

you have 3 objects in your program: friends, bill and steve, which one do you want to loop over?


#3

Thanks for the reply. I want to loop friends


#4

currently you loop object, but you have no object named object? Loop over friends instead


#5

I was able to figure it out on my own. Thanks for the help anyway.


#6