Unit 2 Part two:


confirm("I understand");
confirm("What's your age?");
var age = prompt("Ready to play?");
if(age < 6)
{console.log("Sorry you cannot play");}

Says I haven't checked for the users age, could someone explain how to do that?


Assuming I'm on the same part you're on, because your title is misleading, you don't need your second confirm statement. The instructions also say to make age equal prompt("What's your age");. Then they ask for you to make an if/else statement that checks if the age is less than 13. So your 6 should be a 13. It should pass after that.