Having a problem with this one


#1

I'm getting the same error here now, can u help?

var friends = {
bill: {
firstName: "Bill",
lastName: "Gates",
number: "(206) 555-5555"
}

steve: {
    firstName: "Steve",
    lastName: "Jobs",
    number: "(123) 456-7890"
}

};


SyntaxError: Unexpected identifier
#2

Sure! Well var friends should = {}; instead of {. This means whatever you put in brackets below will be whats in friends I believe. Also it might be worth putting a comma after both of your telephone numbers as well. Thirdly, you need a semi colon after both ending } and you can get rid of the }; at the end I do not believe that is necessary. Hope that helps! :smiley:


#3

Nope. changing to this
var friends = {};
bill: {
firstName: "Bill",
lastName: "Gates",
number: "(206) 555-5555"
};

steve: {
    firstName: "Steve",
    lastName: "Jobs",
    number: "(123) 456-7890"
};

gives me this error SyntaxError: Unexpected token :


#4

Yeah that is what I am looking at right now... For starters here is my code that passed

var friends = {};
friends.bill = {
firstName: "Bill",
lastName: "Gates",
number: "(555) 555-5555"
};
friends.steve = {
firstName: "Steve",
lastName: "Jobs",
number: "(444) 444-4444"
};

Now I will compare this one with yours


#5

I will put the differences here: The differences for what its worth. The : error was trying to get you to put an equal sign instead. Also, I believe the major difference is that friends. is needed before Bill and Steve to make it work. Connecting it to the var friends maybe... Not sure. Your code following my format

var friends = {};
friends.bill = {
firstName: "Bill",
lastName: "Gates",
number: "(206) 555-5555"
};
friends.steve = {
firstName: "Steve",
lastName: "Jobs",
number: "(123) 456-7890"
};


#6

awesome thanks again!


#7