2/7 age problem


#1

confirm ("thou art ready?");

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

if(age > 18)
{ console.log("You are eligible to play") }
else
{ console.log("You are not eligible to play") }

this is what I typed.
response is constantly that I did not check for user's age


#2

The syntax looks correct, but the problem may be that instead of 13, you put 18. Codecademy sometimes makes you do it exactly, so I believe that is the problem.


#3

I did mine like this and seems to work.

confirm("I am ready to play");
var age = prompt("whats your age");
if ( age < 13) {
console.log("You can play but not my responsibility");
}
else {
console.log("You are old enough to play");
}



#4

Thank you! it worked when I changed the age to 13 lol