What did I do wrong? please help!


#1

// Check if the user is ready to play!
confirm("I am ready to play!")
var age = prompt("What's your age");
if(age is less than 13)
{
console.log("You are allowed to play but I am not responsible.");
}
else
{
console.log("Good luck!");
}


#2

Hi @arraysolver74905,

If it may help please see the code example below.
In short there was just one minor change required here, because you are coding in JavaScript we need to use syntax (lingo) that JavaScript understands, so we take your pseudo code, and we change it to something JS can use =)

Great effort coding otherwise.

// Check if the user is ready to play!
confirm("I am ready to play!")
var age = prompt("What's your age");
if(age < 13) //rather than use english we swicth this for syntax that Javascript can understand
{
console.log("You are allowed to play but I am not responsible.");
}
else
{
console.log("Good luck!");
}

Happy Coding!

Cheers,
Michael