Hello, i am old enough ,but i can not solve it :(


#1

what is wrong with my code? i have check several times.

// Check if the user is ready to play!
confirm("i am ready to play!");
var age = prompt('what is your age");
if(age >13)
{
console.log(" you can't play");
}
else
{
console.log(" you will play next year");
}


#2

Hey there!
if you take a look at that:

You can see that you started the prompt with a single quotes mark but ended it with a regular quote mark.

it should be the same marks for both sided like so:

 var age = prompt("What is your age?");

#3

wow, i feel stupid ... thank you ... " that was the problem...


#4

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