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


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");
console.log(" you will play next year");


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?");


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


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