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



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"); 


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


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

if(age < 13) is correct.


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