8. Functions, return and if/else | i'm stuck a bit



I’m stuck and need some help pls. I made a function called ‘quarter’ and give this function a parameter (12).
So, the ‘quarter’ function divide 12 with 4 and give a return value 3.
And i think 3 % 3 === 0, but as the error message said, something wrong. :smiley:


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’?

// 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");




if (quarter() % 3 === 0 ) 

in the if statement, you don’t give an argument to calling quarter. The function call should be in the if condition, and correct so the condition evaluate to true


Oh! It’s makes sense now. Thanks a lot!