Lesson 8.Functions



This is the error message SyntaxError: expected expression, got keyword 'else'

my code

// Define quarter here.
var quarter = function(number) {
    return number / 4;

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


shouldnt have a semicolon at the end of if statement @feephill :wink:.


Okay, I fixed that, now it's giving me this error.
Error: Oops, try again.
Did you remember to call quarter() inside the if statement with a
value that would cause it to print 'The statement is true'?


thats because you have to pass a argument... like :


not just empty paranthesis...


Thank you for your help