Old enough to play?


#1

What I am doing wrongly here???? Many thanks for your help

// Check if the user is ready to play!
confirm ("I am ready to play!");
var age = prompt ("What's your age");
if (age =< 13);
{
control.log( "You are allowed to play but I take no responsibility");
}
else
{
control.log("Play on!");


#2

It's console.log not control.log

also if(age < 13) no need for the =


#3

Thank you ! of course console not control!!!!

I had change that, still no success
:((
confirm ("I am ready to play!")
var age = prompt ("What's your age")
if (age< 13);
{
console.log("You are allowed to play but I take no responsibility");
}
else
{
console.log("Play on!");
}


#4

woops looks like a mistake from my side, swap the < for a > and see if that works.

(age > 13)


#5

TELLS ME that there is a problem with the syntax:confused:


#6

I see where you've gone wrong.

remove the semi-colon here its ending the loop before it can run. If that still doesn't work compare it to this


// Check if the user is ready to play!
confirm ("I am ready to play");

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

if ( age > 13 )
{
console.log("You can play but we take no responsibility")
}

else
{
console.log("Play on!")
}


#7

Thanks !!! you are genius!!