List 'em all! I don't know what I'm doing wrong


#1


I looked at other questions being asked and I don't know what I'm doing wrong


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


Output : [ 'bill' ]
[ 'steve' ]
[ 'bill' ]
[ 'steve' ]

Oops, try again. It looks like your list function isn't printing the right output.


var friends = {
    bill: {
        firstName: "Bill",
        lastName: "Smith",
        number: 0,
        address: ["64 yer mum road", "ayayya", "s2325435"]
        },
    steve: {
        firstName: "Steve",
        lastName: "Jobs",
        number: 1,
        address: ["64 yer mum road", "ayayya", "s2325435"]
        }
};

var list = function(object){
    for (var key in object)
    {
        console.log([key]);
    }
}

list(friends);


#2

Log only the variable, without the block brackets.


#3

A post was split to a new topic: List 'em all


#4