Can Find Error


#1


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

Oops, try again. There was a problem with your syntax.

// Check if the user is ready to play!
confirm("Are You Ready To Play Rohan's Code Adventure");
var= prompt("What Is Your age?");
if(age is less than 10){
    console.log("Sorry You Are To Young To Play, Try When You Are Older.");
}
else
{
    console.log("Good news you are old enough to play so get ready for playing Rohan's code adventure.");


#2

almost there, but the js interpreter still needs your help.

var= prompt("What Is Your age?");

should be

var age = prompt("What Is Your age?");

if(age is less than 10)

should be

if(age < 10)

and I hope in your code the else statement has a closing curly bracket }


#3

Still gives this error
Oops, try again. It looks like you didn't check for the user's age.


#4

HERE IS THE NEW CODE

// Check if the user is ready to play!
confirm("Are You Ready To Play Rohan's Code Adventure");
var age = prompt("What Is Your age?");
if(age < 10){
console.log("Sorry You Are To Young To Play, Try When You Are Older.");
}
else
{
console.log("Good news you are old enough to play so get ready for playing Rohan's code adventure.");}


#5

I ran it and it works.

You should see two pop up windows
First asks if you are ready to play.
Into second you put the age.

Do you see the two pop up windows?


#6

Adding on to @puristaja

If you do get those pop up's click accept, not cancel, if neither show up its likely you have adblock, or a pop-up blocker pause/deactivate it when you try to run the code