Whats wrong? (javascript)


#1

confirm("Are u ready to play!");
var age = prompt("what's your age");
if(age is less than 7) {
    console.log("you're to young... it's not responsible to play the game :)");
} else(age is higher than 7) {
    console.log("let's go! :D");
}

#2

Hi Sgt,

It looks like you're using pseudo-code within your conditionals.

if(age is less than 7) {

Take a look at the parenthesis - you should use the variable age and then the operator, followed by the value you want to compare: (age < 7 )

Same thing applies to your fifth line.

Let me know if that helps!

  • lloan