5/8 What is worng with my code? [SOLVED]


#1

Here's my code:

    var friends = {
    bill = {
        firstName: "Bill",
        lastName: "Gates",
        number: "235-849-152",
        address: ["Happy Ave","Happy city","Happerini","18777"]
    }

    steve = {
        firstName: "Steve",
        lastName: "Jobs",
        number: "482-068-265",
        address: ["Sad Ave","Sadtown","Sadirito","077666"]
    }
};

Every time that I click the "Save and submit code" button, it tells me this:

SyntaxError: missing : after property id

I can't find the mistake myself, please help! Thank you.


#2

You need a colon instead of equals sign after bill and steve like so
bill: {
firstName}
steve: {
firstName}
because they are keys in an object too.


#3

When I do it it tells me this:

SyntaxError: missing } after property list

note that all the other code is the same. I don't know what to do.
Thank you for your help!


#4

i think you should put a comma after the } of bill
like this,try it

number: "235-849-152",
    address: ["Happy Ave","Happy city","Happerini","18777"]
}  ,

steve : {
    firstName: "Steve",
    lastName: "Jobs",

#5

Thank you, it worked.