OOP / Anonymous Functions [Teach Yourself JavaScript]

var Car = new Object();

Car.color = "red";

Car.brake = function() {


I keep getting an error
I cant seem to find my typo.

Anyone been stuck on this spot?


You need to use console.log(); not alert();
Like this: console.log("Braking!");

1 Like

Thank you.
This fixed my problem.
This has helped me move forward through the tutorial.

I thought I had tried using console.log, but I must have done it incorrectly.
Thank You

1 Like