1. Introduction


#1

Link to Exercise

I thought I'd be clever and ask the user for their speed, but if I type in any number above 80 it gives me the following error message, even though the output I receive is correct.

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.

var speed = prompt("How fast are you going?");

if (speed > 80) {
	console.log("Slow down")
} 
else {
    console.log("Drive safe")
};

I mean is it just codecademy being extraordinarily picky... or?


#2

the string printed should be an exact match, copy paste it from the instructions


#3

It is an exact match?!?!

Instructions:
01. If speed is greater than 80, use console.log to print "Slow down"
02. Otherwise (else), use console.log to print "Drive safe"

My strings:

if (speed > 80) {
	console.log("Slow down")
} 
else {
    console.log("Drive safe")
};

#4

it seems its impossible to use prompt(), sorry my mistake

well ,maybe if you enter 65, but you can't pass the exercise with prompt otherwise


#5

So it is just Codecademy being picky. Because I mean, it works for anything less than or equal to 80.


#6

codecademy is being picky, the exercise expects Drive safe as output, so you can enter 80 and lower.


#7