"Unexpected Token" in Arrays and Objects 12


#1


https://www.codecademy.com/en/courses/javascript-beginner-en-9Sgpi/2/4?curriculum_id=506324b3a7dffd00020bf661


Okay, so I tried this code to create three objects: object1, object2, and object3, as asked. It looks fine to me, but when I try to sumbit I get: "SyntaxError: Unexpected token {". What does this error message mean? What am I doing wrong? How can I fix it???


var object1 {
    name: "Brett",
    number: 337
};

var object2 {
    name: "Mittens",
    number: 134
};

var object3 {
    name: "Cali",
    number: 296
};


#2

The token is unexpected because an assignment is expected.

var object1 = {

#3

Okay, thank you very much. . .I need to be careful to watch out for small things like that!!


#4

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