Need help with 1


#1

Can't figure out what I'm missing. If I use
var speed = 65;

if (speed > 80) {
console.log("Slow down");

}
else {
console.log.("Drive safe");

}

I get SyntaxError: missing name after . operator

and using

var speed = 65;

if (speed > 80) {
//console.log("Slow down");

}
else {
//console.log.("Drive safe");

}

Gives error, looks like you didn't print the correct string. Where am I going wrong?


#2

Hi @pieisnice9 ,

You have:

console.log.("Drive safe");

That dot after log needs to be removed. You should have:

console.log("Drive safe");

#3

Thank you! That fixed it for me