Functions return If/else help


#1

var quarter = function(number)
{
return number/4;
}
if (quarter(12) % 3 === 0 );
{
console.log("The statement is true");
}
else
{
console.log("The statement is false");
}

This is what I have but I keep getting the message: SyntaxError: Unexpected token else

Not sure what I need to fix, feel like I'm driving myself crazy trying to figure this out, lol


#2

Your if-statement has no body because you terminate it immediately after the condition with ;

The else therefore isn't following an if, and so it can't be there, it's invalid syntax.


#3

Thanks! I figured this our right after posting but you explanation of what happened is hopefully going to help me keep from making this mistake in the future!


#5