2. Old Enough to play problem


It keeps saying you didn't check for the users age, and in the log it says my else statement.

confirm("Are You ready to Play?")
var age = prompt ("what is your age");
if("age" >= 16)
console.log("you are allowed to play");
console.log("you are not allowed to play");


Since age is a variable there is no need for quotes :slightly_smiling: .


if(age >= 16)

will do

You were literally comparing the string "age" to 16 which will probably not give you what you want.

Hope that helps :sunny:


thanks for the help :).