Functions, return and if / else


Really Dumb question***

Why don't I need to call out the function anymore. I already know you're supposed to just put a value in the parenthesis, but why can't I call the function this way?

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

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


HI this line

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

instead of quarter() you should put quarter(12) (the one you put at the end of your code)


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