12. Practice Makes Perfect Unexpected Token


#1

This is my code... I am not sure why it will not work. I keep getting: Syntax Error: Unexpected token =. Thanks in advance for the help.

var object1 = new Object();
object1.shape = "square";
object1.color = "green";

var object2 = {
color = "yellow",
luster = "metallic"
};

var object3 = {
size = "large",
condition = "kind"
};


#2

var object1 = new Object();
object1.shape = "square"; // Here you use "="
object1.color = "green";

var object2 = {
color = "yellow", // But here you should use ":"
luster = "metallic"
};

var object3 = {
size = "large",
condition = "kind"
};

Correct exercise:
var object1 = new Object();
object1.shape= "square";
object1.color= "green";

var object2 = {
color: "yellow",
luster: "metallic"
};

var object3 = {
size: "large",
condition: "kind"
};


#3

Thanks!! This was very helpful!