PLEASE HELP ME! Old Enough to play


#1

What is wrong!

if(age is less than 11) 
{
    // console.log("You aren't eligible to play wait until you are of 11 years of age!");
}
else   
{
    // console.log("You are old enough to play! Lets go my friends");
}


#2

You are taking it too literal. :slight_smile:

Remember, to evaluate for less you use < so to check for age it would be

age < 11 which is the same as saying in English terms age is less than 11


#3

Thanks for the help!


#4

Help me Again PLZ!!!!

// Check if the user is ready to play!
confirm("I am ready to play!");
var age = prompt("What's your age?");

if(age < 11)
do{
// console.log("You arn't eligabal to play wait untill you are of 11 years of age!");
} else {
// console.log("You are old enough to play! Lets go my freinds");
}


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.