12 Practime makes perfect, what's wrong?


#1


var object1 {
    marca: "Seat",
    modelo: "Altea"
}

var object2 = new Object();
object2["marca"] = "Opel";
object2["modelo"] = "Corsa";

var object3 = new Object();
object3["marca"] = "Renault";
object3["modelo"] = "Megane";


It returns a "SyntaxError: Unexpected token {"


#2

You're missing an = sign here.

Also, cross-check your object2 and object3

You add to a newObject() like this:

object2.age = 20;

I hope this helps! :slight_smile:


#3

Thanks, it worked! Fast response!


#4

You're welcome.

Have fun coding! :slight_smile:


#5

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