Search for a Friend


#1



SyntaxError: Unexpected token


var friends = {
bill: {
    firstName: "Bill",
    lastName: "Gates",
    number: "(206) 555-5555",
    address: ['One Microsoft Way','Redmond','WA','98052']
},
steve: {
    firstName: "Steve",
    lastName: "Gordon",
    number: "(888) 564-2222",
    address: ['3333 Disney Land','Los Angeles','CA','89760']
},
mark: {
    firstName: "Mark",
    lastName: "Zuckerman",
    number: "(866) 789-4567",
    address: ['Facebook Way','Palo Alto','CA','94601']
};
var list = function(friends) {
    for (var firstName in friends) {
       console.log(firstName);
    }
};
var search = function(name) {
for (var firstName in friends) {
if (friends[firstName] === name {
console.log(friends[firstName, lastName, number, address]); 
return friends[firstName, lastName, number, address];
}
}
};
search ("Mark");


#2

You need a closing bracket for your "friends" one.


#3

Ahh let me try that.


#4

closed it but still getting an error.


#5

A syntax error?:neutral_face::grimacing: or a different one?


#6

same error as before


#7

I'll keep looking for errors


#8

any luck still not working?