2/7 age problem


confirm ("thou art ready?");

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

if(age > 18)
{ console.log("You are eligible to play") }
{ 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


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.


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


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