Old enough to play?


#1

I keep getting the error that I haven't confirmed the user's age but a box pops up asking me the user to type in their age and I get it to print to the console.
This is what my code looks like:confirm ("I am ready to play")

var age = prompt("What's your age?")
if(age<13)
{
console.log("You need a parent's permission!");
}
else
{
console.log("Enjoy the game!");
}

Can someone help me figure this out please?
Thanks!


#2

The only thing I see missing is a semi-colon after the var age.

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

Otherwise the syntax looks exactly like my code did.