Please Help. Lesson 12. Practice Makes perfect


#1


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


I get an error message:

SynthaxError: Unexpected token:

I triple-checked my code, and I still do not see what I did wrong. Could you please help!

Thanks a lot!


var object1 = new Object(); 
object1.airplane = "Piper"; 
object1.speed = 130; 

var object2 = new Object();
object2.motorcycle: "Dukati"; 
object2.velocity: 125; 

var object3 = {
    car: "BMW", 
    speed: 75
};


#2

you define object1 and object2 in the same way, yet one time you use equal signs (assign, which is good), the other time use a colon, this should be equal signs


#3

I suggest running the code in a different interpreter, one that has more verbose error messages.

For example, on my local machine, I can paste your code to a file and try to run it with nodejs, which looks like this:

$ xsel > vbelevich.js 
$ node vbelevich.js 
/tmp/js/vbelevich.js:6
object2.motorcycle: "Dukati"; 
                  ^
SyntaxError: Unexpected token :