It gets me one answer only


#1

confirm("I am ready to play!")
var age = prompt
prompt("what's your age?")
if(age<13)
{
console.log("old enought to play?")
}
else
{
console.log("have fun!")
}
Ican't find the reason why the response is always "have fun" even if I type in the prompt age 10, 13 or 25, if somebody haves time to explain thenk you.


#2

Age needs to be the prompt saying "What's your age?".


#3

Not sure if cadecodes saw that you actually have 2 prompts, nonetheless

you have 2 prompts get rid of one and it should work .

Don't forget capitals and punctuation :slightly_smiling:


#4

still doesen't work... hmm what else am I missing?


#5

What's the error message its giving you?

If its saying you didn't print out one of the string even though you did, copy and paste it from the instructions.

Hope it works :slightly_smiling:


#6

There is no problem, I can get to the next step.
The only thing is that i thought that when you put under age 13 the answer would be "old enought to play?"
and above "have fun!" and what happenes is the annswer is the same, no mather what i imput....:frowning:


#7

Ah I see in your

if("age"<13) make this if(age < 13);

take age out of " " because its making it a string rather than the variable.

That will then change the answer :slightly_smiling:


#8

You are right, it was the "", now it works!

I was searching for hours and could't find the answer :slightly_smiling: and still is curious how you can get to the next step with this kind of error. Thank you!!