Help with 6/8? I think I have a bug


#1

Codeacademy is telling me to make a function called list, but I'm pretty sure I have one, and I can't find a syntax error.
Here is my code.

var friends = {
bill: {
firstName: "Bill",
lastName: "Gates",
number: 781,
address: ["Microsoft", "Silicon Valley", "CA"]
},
steve: {
firstName: "Steve",
lastName: "Jobs",
number: 666,
address: ["Purgatory", "Heck"]
}
};
//Here is the function!!!
var list = function(friends) {
for (var key in object) {
console.log(key);
}
};


#2

this line

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

should be

var list = function(friends) {
                for (var key in friends) {
                    console.log(key);
                }
            };

#3

Thanks! That works, but apparently I didn't log anything into the console. why?


#4

This exercise confused me too, I feel there is a bug in at least this portion of the exercise explanation, as the "object" in the for/in loop is purple, instead of white, making it seem like it's part of the syntax, not a parameter/variable/whatever you call it: