If / else statements not registering... help?


#1

Hey all, i’m stuck at the ‘old enough to play’ section of this code… for some reason my ‘else’ statement registers a syntax error. here is my line for this section:

confirm(“ready to play?”);

var age = prompt(“what’s your age?”);

if(age >13) ;
{
console.log(“youngin’!”) ;
}
else;
{
console.log(“play on!”) ;
}


#2

Hello @mikos87, look here:

Look at these statements. Something is wrong with them, they won’t execute because something is in their way. Do you see it? :wink:


#3

HA! the one semi-colon i hadn’t thought of removing! thank you so much!


#4

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