How do you do the age thing?


#1

Please help me! Why wont it work?????


#2

Where's your code? We can't help unless you provide some code.


#3

How do I do that? Im sorry I don't know how to do this.. But I really want to!


#4

/ confirm("Are you ready to play?");
var age = prompt("How old are you?");
if (age is less than 13)
{
console.log("BE AWARE. WE ARE NOT RESPONSIBLE FOR ANY COMPLAINTS.");
}
else
{
console.log("We hope that you enjoy your stay...Because you will be staying here for a while...");
}

(does this help?)


#5

Remove the /.

You need to use comparison operators.

age < 13

#6

thanks! And the confirm thing was supposed to be like : //confirm
Do I still remove it?


#7

Yes.


#8

You can't just type "is less than". You have to type the actual symbol for it.