Search Help!


I am on the search function and I keep getting an error even though it matches the hint please help.

var friends = new Object();

friends.bill= {
    firstName: "Bill",
    lastName: "Gates",
    number: "555-555-5555",
    address: ['Microsoft', 'xbox', 'WA']

friends.steve = {
    lastName: "Jobs",
    number:" 543-333-3333",
    address: ['Apple', 'Tree', 'CA']
var list = function(obj){
    for(val in obj)

var search = function(name){
    for(var person in friends)
        if(friends[person].firstname === name)
            return friends[person];



@caleb.hatcher, look to this line:

if(friends[person].firstname === name)

and look to your properties in obj friends.
Do you have property firstname?


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.