Code your own adventure help!


confirm("I am ready to play!")
var age = prompt("What's your age?")

if(age <= 16)
    console.log("You're allowed to play but we take no responsibility")
    console.log("You're the pefect match, this game was made for you!")




The instructions tell you to test if the user’s age is less than 13 not 16. So remove the = sign too.


You are also missing semi colons


// Check if the user is ready to play!
confirm(“are you ready?”);
prompt(“How old are you?”);
var age=“18”
if (age >= 18)
console.log(“Youre old enough to play”);
console.log(“Youre not old enough to play”);

console.log(“Snow White and Batman were hanging out at the bus stop, waiting to go to the shops. There was a sale on and both needed some new threads. You’ve never really liked Batman. You walk up to him.”);

console.log (“Batman glares at you.”);
var userAnswer = prompt(“Are you feeling lucky,punk?”);


Hi this part

prompt("How old are you?"); 
var age="18"

should be like that

var age = prompt("How old are you?"); 

then here

if (age >= 18)

I think they aske you to check 13 years old