2. old enough to play?


#1

Ive tried looking for similar problems. It runs but keeps saying " It looks like you didn't check for the user's age." HELP!!!!

var age = prompt("How old are you?");
if(age < 21) {
console.log("You can't play");}
else{
console.log("Good Luck!");}


#2

you have to make the 21 a 13


#3

wth lol that worked! Thank you!


#4

I'm on code your own adventure 2. Old enough to play. It keeps saying syntax error. Here is my code.

// Check if the user is ready to play!
confirm("Are you ready to play!");
var age = prompt("What's your age?");
if(age < 13) {

console.log(You are allowed to play but I take no responsibility for your actions.);

} else {

console.log("You are ready to play!");

}


#5

nvm. Someone told me that on console log "You are allowed to play but I take no responsibility for your actions" I needed quotation marks.