Unit 2 Part two:


#1

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

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


#2

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.