What did wrong?


#1


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


Oops, try again. Did you create a function called list?


var friends = {
 Bill: {
     firstName: "Bill",
     lastName: "Wood",
     number:   "374-3158",
     address: ['Montreal','Quebec','Canada']
     },
 Steve: {
     firtsName: "Steve",
     lastName: "Roux",
     number:   "728-2925",
     address: ['Quebec','Quebec','Canada']
     }
};
var list = function(friends){
 for(var key in object){
    console.log("Bill"); 
 }
};
list("bill");


#2

Check this line of code.
also your functions parameter is friends so you have to iterate over friends not object?
Read instructions and theory again!


#3

Hi dude, you can't use
"
for(var key in object)

"

Because in this question the object is friends,

So you should write like this way:
"
for(var key in friends)
"


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.