1/13 Writing right code but I get error


#1

var speed = 65;

// Complete the condition in the ()s on line 4
if (speed > 80) {
console.log = ("Slow down");
// Use console.log() to print "Slow down"

}
else {
console.log = ("Drive safe");
// Use console.log() to print "Drive safe"

}

Oops, try again. It looks like you didn't print the correct string. Check your condition in the if statement, and your console.log statements.

What's the problem? It printed Drive safe and still error. I tried without ; after console.log too.


#2

Hereby you overwrite console.log with "Slow down". So get rid of the = and after this refresh the page to reset the value of console.log otherwise it will tell you that console.log is no longer a function (but a string).