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


#1



https://www.codecademy.com/courses/javascript-beginner-en-x9DnD/0/2?curriculum_id=506324b3a7dffd00020bf661#


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");
    }
    
else{
    console.log("you're old enough to play this game");
    }


#2

Perhaps you named the variable differently?


#3

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


#5

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


#6

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