2. Code Your Own Adventure


#1

Hey everybody. The error states that I have not "checked for the user's age?"

confirm ("I am ready to play, click to proceed");
var age = prompt ("What's your age friend?"); // I thought this is me asking for their age? And then if below//
if (age < 25);
{ console.log ("You can play but I take no responsibility");}
else
if (age > 25);
{ console.log ("You're way too old comrade! Get a job!");}

Help for a noob please!


#2

Nevermind everybody; the program is very sensitive to age!

It just haaaaaad to be 13.


#3

Also no semicolons after conditions:


#4

after the else; (if (age>25); ) isn't need to complete code.


#5

I need help. Here is my code. I am on code your own adevnture. 2. Old enough to play? It keeps saying syntax error.

// 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!");

}