I don't understand what is wrong with this piece of code


#1


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


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


confirm("I am ready to play");

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

if(age is less than 13) 
{
    console.log("you are allowed to play"); 
} 

else 

{
    console.log("you can't play");
}


#2

if(age is less than 13) this is wrong.

if(age < 13) is correct.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.