I need help!


#1



https://www.codecademy.com/courses/javascript-beginner-en-3bmfN/0/7?curriculum_id=506324b3a7dffd00020bf661#

It says: SyntaxError: Unexpected identifier

var friends = {
    bill: {
        firstName: "Bill",
        lastName: "Gates",
        number: "(206) 555-5555",
        address: ['1307 Crockett Dr.', 'Tallahassee', 'Florida', '12345']
    }
    steve: {
        firstName: "Steve",
        lastName: "Jobs",
        number: "(214)-320-1111",
        address: ['1293 Gladewater Dr.', 'Frisco', 'Texas', '23456']
    }
};


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

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


#2

Hello!

I think you might be missing the curly bracket and semi-colon in the first variable for your empty object.

var friends = { };

hope this helps


#3

The only problem is that whenever I just have bill gates, it works. But whenever I have Steve, it doesn't.


#4

You have got syntax error. So you need to fix those. Try codecademy labs:link here
I already can see there need a comma (,) between bill and steve associate arrays. But there might be more errors.

Write your code there and it will show errors with yellow triangles or red circles. If you hover over the circle or triangle it will say what it expect from you to be correct. Try to find those errors and see if it can help.