Search function doesn't return contact info for Steve


#1

I've check this as much as I can and I don't see the problem.

var friends = {
bill: {
firstName: "Bill",
lastName: "Gates",
number: "(206) 555-5555",
address: ['One Microsoft Way', 'Redmond', 'WA', '98052']
},
steve: {
fistName: "Steve",
lastName: "Jobs",
number: "01456 846 159",
address: ['One Apple Close', 'Macville', 'IA', '64581']
}
};

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

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


#2

Solved it.
Spelt first wrong.