Didn't ask for user's age...? BUT I DID!



I keep getting an error message saying"It looks like you didn't check for the user's age" but I clearly did, in fact, the program runs perfectly and asks for the user's age with a pop-up message.

// Check if the user is ready to play!
confirm("I understand confirm!")

var userAge = prompt("What's your age");

if( userAge < 18 )
    console.log("you're not old enough to play this game");
    console.log("you're old enough to play this game");


Perhaps you named the variable differently?


i ran your code and it worked! try refreshing the page :slight_smile:


Hey, I'm getting the same error, did you find a resolve?


Ok, I got it. They won't accept any other number by 13. lol.
So just type 13 instead of 18.