Not working with "quarter(number/4);" added, why?


The is the code that I have

// Define quarter here.
    var quarter = function(number) {
        return number/4;
    //quarter(number/4);  **This is the line that I added which will make it doesn't work**

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

What did I do wrong? Don't really understand here...


Hey @betapro81907,

Refreshing will do the trick. :wink:

You have no syntax errors in your code, I believe. :smiley:

#3 still shows the error when I did not comment out that line...


It's not supposed to work if you take the // off of that line.

That's a line that won't work because you already did it in your function, and repeating it makes a syntax error. :smiley:


You mean the following two lines are duplicating?

return number/4;


So when there are return, usually we don;t need to call the function again to prevent it from error?


We use return to signal for a function to stop. :smile:

No, we don't need to call the function again to prevent it from error because returns stop the function, or signal something to it. Calling the function again would help nothing in calling a return statement, I believe. :smiley: