Syntax Error: missing curly bracket } - I can't find it?


#1

I'm trying to just add the first name, last name, and number, but it keeps giving me this error:

SyntaxError: missing } after property list

I even tried copying the example code and just editing that but it's still not working? Can anyone tell me where my error is? Thanks in advance! Here's my code:

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

steve: {
    firstName: "Steve",
    lastName: "Jobs",
    number: "(206) 999-9999"
}

   Teresa : {
    firstName: "Teresa",
    lastName: "Smith",
    number: "(206) 517-9587"
}

john: {
    firstName: "John",
    lastName: "Jenkins",
    number: "(206) 260-9397"
}

};


#2

OP here... I've tried commenting out the steve through john objects... and it works then. (sorry i'm not very good at wording my thoughts... But if it only has the 'bill' object in the 'friends' object, then it works. But with the other 3, it doesn't work? Even though I copy/pasted the Bill object and just changed the names... I am just so confused lol


#3

This:

{
    firstName: "John",
    lastName: "Jenkins",
    number: "(206) 260-9397"
}

Is an object literal.
What separates the attributes?

You are also assigning the result of an object literal to friends. See any difference in how the attributes of that object literal are separated?


#4

OH MY GOSH. I can't believe I just overlooked those stupid commas lol. Thanks so much! It's working now!