List function not working


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);}




for(var x in object)

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


Thanks for the reply. I want to loop friends


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


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