7/8 steve and bill


#1

what is wrong with this code? it logs steve's and bill's please help :frowning:
var friends = {
bill: {
firstName: "Bill",
lastName: "Gates",
number: "(206) 555-5555",
address: ["One Microsoft Way", "Redmond", "WA", "98052"]
},
steve: {
firstName: "steve",
lastName: "Gates",
number: "(206) 555-5556",
address: ["One Microsoft Way", "Redmond", "WA", "98052"]
},
};
var list = function (bill) {
for(var key in object) {
console.log(key);
}
};
var search = function (name) {
for (prop in friends) {
if(friends[prop].firstName === name) {
console.log(friends[prop]);
return friends[prop];
}
}
};

search("steve");


#2

steve and bills info


#3

Hi!

"for(var prop in friends)" - declare the prop.

I hope it will help.


#4

what is "PROP"? Ive seen this in a bunch of posts about this lesson and I dont see prop anywhere in the instructions