PLEASE HELP! 2. Old enough to play?


#1

Hi everyone!

I really don't understand what I'm doing here. Here's what I have written:

confirm("Are you ready to play?")

var age = prompt("What's your age?");

if(age < 13)
{
console.log("You can play, but we take no responsibility.");
}

else {
console.log("We hope you have fun playing the best game in the universe!");
}

I keep getting a warning saying "Did you set the age variable equal to the result of prompting the user?" I don't even know what this means or how to fix it. Please help? Thank you!


#2

Just a bug, try refreshing your browser and you should be good to go :+1:


#3

didn't work :confused: the black screen says "We hope you have fun playing the best game in the universe!" but it still won't let me pass because of the "Oops, try again. Did you set the age variable equal to the result of prompting the user?"


#4

One moment please. I will post when I find solution.


#5

Your code works for me. I would suggest refreshing your browser or trying this in "inPrivate" or "Cognito" mode (based on browser) If you cannot pass this lesson after that point I would say to come back to it at a later time. Your code is working but not being conveyed to the server.


#6

okay, i'll try later or on my computer at home! thanks very much :smile:


#7

Hi! Asouza18

In the hint it says to Copy and paste the string exactly as it is written in the instructions. Just copy and paste

Hope it will work for you :smile: