4/8 Adding Properties


#1

Give each of your friends a firstName, lastName, and number. The value for each of these should be a string (check the Hint if you need help). Make sure bill's first name is "Bill" and steve's first name is "Steve" (again, note the capitalization).

var friends = {
kierra: {
firstName: "Kierra",
lastName: "Ruffins",
number: "(207) 123-4567"
}
bill: {
firstName: "Bill",
lastName: "Cosby",
number: "(207) 234-5678"
}
steve: {
firstName: "Steve",
lastName: "Williams",
number: "(207) 345-6789"
}
deahna: {
firstName: "DeAhna",
lastName: "Ball",
number: "(207) 456-7890"
}
};

Oops, try again. There was a problem with your syntax.
SyntaxError: Unexpected identifier


#2

In this part of code:

kierra: {
    firstName: "Kierra",
    lastName: "Ruffins",
    number: "(207) 123-4567"
}

you have used commas to separate properties, right? :smile:

You have to do the same thing with your outer object:

var friends = {
    kierra: {
        firstName: "Kierra",
        lastName: "Ruffins",
        number: "(207) 123-4567"
    }, // <-- comma
    bill: {
        firstName: "Bill",
        lastName: "Cosby",
        number: "(207) 234-5678"
    }, // <-- comma
    steve: {
        firstName: "Steve",
        lastName: "Williams",
        number: "(207) 345-6789"
    }, // <-- comma
    deahna: {
        firstName: "DeAhna",
        lastName: "Ball",
        number: "(207) 456-7890"
    }
};