Introduction to Functions in JS meet the functions 1. introduction


#1

var speed = 65;

// Complete the condition in the ()s on line 4
if (speed>80 ) {
console.log "slow down";

}
else {
console.log "drive safe";

}

on the side :
SyntaxError: Unexpected string "slow down"

on the bottom:
Oops, try again. There was a problem with your syntax.

what am i doing wrong?


#2

You're missing some brackets in two places ()

They hold something inside them :slightly_smiling:


#3

Console.log() needs the string enclosed in parentheses. Like:

console.log("Hello!");

#4

var speed = 65;

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

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

}