"It looks like your search function doesn't return contact information for Steve"


#1

var friends= {
bill:{
firstName: "Bill",
lastName: "Gates",
number: "(243)333-4444",
address:["5656 N Major ave","Chicago,IL",'60645']
},
steve:{
firstName: "steve",
lastName: "Gates",
number: "(243)333-4444",
address:["5656 N Major ave","Chicago,IL",'60646']
},

};

var search=function(name){
for(var key in friends){
if (friends[key].firstname===name){
//var contact=friends[key].firstname;
console.log(friends[key]);
return friends[keys];
}
}

}

search("steve");

as the title implies, don't i have it in my code?


#2

@rozi123,

Have a close look at

firstName: "steve",


#3

thanks. I see y. it shows so much about my sloppiness lol.