Older than 13 years?


#1

I am stuck at code your adventure (older than 13 yrs??)

it says:- SyntaxError: Unexpected token else


 
confirm("I am ready to play!");
var age=prompt("What's your age");
if (age<13);
{
    console.log("you may play at your own risk");
}
else
{
    console.log("enjoy the game!!");
}

Please tell me the solution to this problem. Correct my program and put the answer in the answer section.
Thank you.


#2

if (age<13); // unnecasery semi-colon


#3

Thank you!! It works perfectly :smile:


#4