"looks like you didnt ask for the user's age"- please help!


#1

I am doing what it is telling me to but it still does not work!

// Check if the user is ready to play!
confirm("are you ready to play?");
var age = prompt("What is your age?");
if(age < 10) {
console.log("You may play, but I take NO responsibility!");
} else {
console.log("play on! You are old enough to play!");
}

if someone could help me that would be great! :slight_smile:


#2

Just read the instructions once again ...

Then write an if/else statement. If age is less than 13, use console.log to tell the user that they're allowed to play but you take no responsibility.


#4

ok ill try.....................


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.