I am stuck , help please


#1

var speed > 80

// Complete the condition in the ()s on line 4
if (speed) {
console.log("Slow down");
}
else if (speed){
console.log("Drive safe");
}

Thanks.


#2

Hi,

var speed > 80 // declaration with =

// Complete the condition in the ()s on line 4
	if (speed) {      // you didnt compare speed with 80
	console.log("Slow down");
} 
else if (speed){ // you need only a else no else if 
	console.log("Drive safe");
}

#3

You can't declare something to be greater than something. You have to set it first. THEN use the if/else statements to do the comparing.

var speed = 80;
if(speed > 80)...

else...


#4

I did ! eu consegui e só colocar desse modo ! não sei por que os erros !!

var speed = 13.02;

if (speed < 80 ) {
console.log("Dirija com segurança");
} else {
console.log("Reduza a velocidade");
}

obs: console.log() e bom apagar e colocar novamente mais pode ir salvando!


#5

nice man, its just to invert those strings and the condition .


#6

var speed = 65;

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

}


#7

var speed = 64 //

// Complete the condition in the ()s on line 4
if (speed > 80) { // you didnt compare speed with 80
console.log("Slow down");
}
else if (speed){ // you need only a else no else if
console.log("Drive safe");
}


#8

Hi this part

else if (speed){ // you need only a else no else if

Did you read the comment

// you need only a else no else if