Stuck at Contact List Project EX 6


#1


Unable to complete EX 6 of contact list. i think is it is supposed to log NAME's of my contacts but instead its logging
[Function: list]
[Function: list]


Here is the link to that exercise
https://www.codecademy.com/en/courses/javascript-beginner-en-3bmfN/0/6?curriculum_id=506324b3a7dffd00020bf661#


var friends = {
    bill: {
    firstName : "Bill" ,
    lastName : "Walls" , 
    number : 199,
    address : [331 , "E-Block" , "Sydney" , "Australia"]
    },
    steve: {
    firstName : "Steve" ,
    lastName : "Jobs" , 
    number : 241,
    address : [312 , "E-Block" , "New Delhi" , "India"]
    }
}
var list = function(friends){
    for(var key in friends){
        console.log(list);
    }
}


#2

you log list to the console, why? list is the function

Which variable do you think you need instead?


#3

OMG, i tried adding KEY instead of LIST earlier about 50+ times but then also never got the answer , now i tried to do that same again and it showed me the answer lol , man im feeling ashamed of myself for doing such a stupid thing.
Anyways thank you @stetim94 for answering me.


#4