If/Else Introduction Syntax


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"

The error was "There was a problem with your syntax".

Replace this line with your code.


When declaring a variable you must assign it a value.

So the below is valid:

var speed = 65;

Whereas your attempt to declare speed as a variable that is > 65 is not :wink:


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