Contact List - Adding Properties



Can't seem to figure out what I'm doing wrong. Here's my code:

Thanks in advance.



For bill and Steve you shouldn't add var


Inside your friends var, "steve" and "bill" should not be variables. Also, put a comma after the second curly bracket on bill, and delete the semicolons after steve and bill. Example:

var friends = {
    bill: {
        firstName: "Bill",
        lastName: "Gates",
        number: "(801) 123-4567"
    steve: {
        firstName: "Steve",
        lastName: "Jobs",
        number: "(999) 479-7799"


@travmoffat87 Also make sure you separate Bill and Steve with a comma, not semicolon. Delete those semicolons.


I tried taking out "var" in front of bill and steve, and closing the bracket at the beginning, and now it's telling me I don't have first names for bill or steve.


Bill and Steve needs to be inside friends so between { }


Doing that gives me SyntaxError: Unexpected token


Can you paste in updated code

Like @quobogeba said:


Thanks quobogeba and zainabrawat. Here's the updated code:


You have bill = {} same with Steve
You need to use a colon bill: {}

*Leave friends


Perfect, thanks!


@travmoffat87 bill and steve should not be assigned to their firstName, lastName ect, with an =. Instead, you should assign them with a colon, like so:

bill: {
  bills code goes here

Just like @zainabrawat said :slightly_smiling:

Oops! Looks like I was too late xD


haha well thanks anyhow :slightly_smiling:


@quobogeba lol

@travmoffat87 You're welcome :green_heart:

Happy Learning :slightly_smiling:
Happy coding !

What inspired you to learn programming/coding?
Join the discussion