Code your own adventure help!


#1

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

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")
}
else
{
    console.log("You're the pefect match, this game was made for you!")
}


#2

@devplayer58323

Hey

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


#4

You are also missing semi colons


#5

// 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");
}
else
{
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?");


#6

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