SyntaxError: Illegal return statement

// Define quarter here.
var number = quarter;
return number/4;

if (quarter(24) % 3 === 0 ) {
  console.log("The statement is true");
} else {
  console.log("The statement is false");


Proper function syntax is something like this:

var functionName = function(parameter) {
code for the function goes here;

Remember that curly braces {} wrap around the function code. Have another look at the instructions and keep in mind what your function's name should be.


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