7.Search for a friend


So this is my code for this part

var friends = {
bill: {
firstName: "Bill",
lastName: "Thorton",
number: "(765) 869-7654",
address: ['42 East Redwood St', 'Charming','CA','99017']
steve: {
firstName: "Steve",
lastName: "Johnson",
number: "(765) 246-8435",
address: ['64 Clarence St','Charming','CA','99017']
var list=function(friends) {
for (var friends in friends) {
var search=function(name) {
for (var friends in friends) {
if(friends[bill].firstName==="Bill") {
return friends[number];

it says it doesn't return contact information for steve, I know I'm doing something wrong I've tried various methods to include steve but nothing is working. Could someone please help me out with this?


Hey @gigacoder67794! Its just a simple funny fix! You actually didnt call the function.

So at the end just include



Hey man, I tried that and it didn't work. (it said steve isn't defined) Got any other ideas?


Try searching for the string maybe ?



I had the same problem. I think the keys Steve and Bill need to be capitalized.