List em all


#1

hello 
i have this small issue, it prints bill and steve which is whats required, but still says my function printed something different
here is my code
var friends ={
    bill:{
        firstName:"Bill",
        lastName:"cosby",
        number:"07858584585",
        address:["seattle","NY"]
        },
        
    steve:{
        firstName:"steve",
        lastName:"jobs",
        number:"0723532432",
        address:["washington","DC"]
        }
    
    };
    function list(name){
        for (var key in friends){
            console.log(friends[key].firstName);
            };
         };


#2

it prints out the first names, it should print the objects bill and steve


#3

so i remove .firstName??


#4

yes


#5

this is the statement am getting
Oops, try again. It looks like your list function isn't printing the right output.


#6

ok i got past the challenge ,, i had to change my console,log statement to this
function list(name){
for (var key in friends){
console.log(key);
};
};


#7

yea, i was just looking at the exercise. key contains bill and steve, so that is all you need to log, good you solved it


#8

Thanks for all your help!


#9