4 Adding Properties. Whats the syntaxError?


#1


4) Adding Properties. I honestly have no clue whats wrong. I have looked it over again and again. I have done exactly as the instructions and the hint have told me. They way I did bill is the exact way the hint did it and i modeled the others like bill. I included commas after the numbers (even though previous exercises didn't). I have tried it with semi-colons after each friend object and that doesnt seem to matter. Anyone please help.


SyntaxError: Unexpected identifier


var friends = {
    bill: {
        firstName: "Bill",
        lastName: "Gates",
        number: "(800) 333-3333",
        }
    steve: {
        firstName: "Steve",
        lastName: "Smith",
        number: "(800) 389-9022",
        }
    conner: {
        firstName: "Conner",
        lastName: "Ward",
        number: "(800) 222-222",
        }
    kyle: {
        firstName: "Kyle",
        lastName: "Johnson",
        number: "(800) 333-3333",
        }
    sion: {
        firstName: "Sion",
        lastName: "Kim",
        number: "(800) 444-4444",
        }
    reed: {
        firstName: "Reed",
        lastName: "Salad",
        number: "(800) 555-5555",
        }
};


#2

There is an issue with creating your objects. If you did follow the instructions, please, post the instructions and/or the exercise link.


#3

I figured it out. I needed commas after each friends } not a semi-colon. Makes sense too.

var friends = {
bill: {
firstName: "Bill",
lastName: "Gates",
number: "(800) 333-3333",
}, <-------- COMMA
steve: {
firstName: "Steve",
lastName: "Smith",
number: "(800) 389-9022",
}


#4

Cool. Exactly! :slight_smile:


#5

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