Adding Properties 4/8 "Syntax Error : Expected "}" But WHERE?


#1

I just don't understand what is wrong with the code??

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

    
  
};

#2

Each properties should be separate by a ,

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

After this javascript expected a } because you didn't tell you've another properties


#3

So what do I do when I finished writing all my properties what do I end with?


#4

nothing!you don't have to do anything.
you must have a , if you want to add more properties


#5

Ohhhhh I understand I just needed to add a simple comma. Thanks :slight_smile:

`


#6

glad you sloved :slight_smile:
Hope you've understand.


#7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.