Alex Alex - 2 months ago 7
Javascript Question

I am just starting in code academy. I am getting the error "SyntaxError: Unexpected token"

My code is :

// Define quarter here.
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");
}


It returns "SyntaxError: Unexpected token"

Can someone point me to my error. Thanks

Answer

var quarter = function(number);

needs to be

var quarter = function(number)

The semicolon is the unexpected token.