8. quarter function totally bugged


Hello, I am new to this forum.
I have a problem with the 8th step ("Functions, return and if / else") of the "Introduction to Functions in JS". I didn't find anything about this here. I quadruple-checked my function an didn't find anything. Plus the error message doesn't make sense at all.

First heres my Code:

var quarter = function(number){

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

I tried many different parameters e.g.:

38 (38/4=9, 9%3=0),
60 (60/4=15, 15%3=0)
12 (12/4=3, 3%3=0)

Although they all should evaluate true, they don't.
Instead I get this:

Oops, try again. Hmm, it looks like your quarter function doesn't return -25 for -100.

Therefore I can't proceed. Please help me.

Thanks in advance.


Edit: typo


Hi the4rcane,

Do you remember that your quarter function is supposed to return the evaluated result? :wink:


could you give an example ?
thanks !


Sure, for example, a function which returns the cube of its argument would look like:

function cuber(num){
    return num * num * num;