My code does not return information about Steve, anyone help


#1

var friends = {
bill: {
firstName: 'Bill',
lastName: 'Gates',
number: '(551) 21 00 03',
address: ['England', 'London', 'BakerStreet', '221B']
},
steve: {
firstName: 'steve',
lastName: 'Jobs',
number: '(579) 98 10 12',
address: ['Georgia', 'Tbilisi', 'Ikhalto St. 27']
}
}

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

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


#2

Looks like you might be missing a } in the search variable.