Cant understand why this isnt working


#1

Hey beginner here can someone show me why this else statement is wrong

var age = prompt(“what is ur age”);
{
if( age <= console.log(“PLAY IT!”));
}
else
{
console.log(“PLAY THE GAME!”);
}


#2

Can you show me all your code plz


#3

Hier lege band,

In you IF condition
you are comparing the variable age with the =console.log()= output…
You might want to do a comparison with a number-Value like 13


#4

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