Syntax Error: Unexpected String!


12. Practice makes perfect

SyntaxError: Unexpected string

var object1 = new Object ();

var object2 = {
    sport: "tennis",
    art: "dance"

var object3 = new Object ();
object3["month"] = 3;
object3 ["name"]= "Bob";

Thanks a lot :slight_smile:


it should be: = "sherry";

object1.year= 2016;

remove the space before ["name"]


Thank you! It worked! But why it only print out "Bob" now? @puristaja


the codecademy editor logs out the property value of the object property declared on the last line. I don't know why. Probably just a safety check.