8.Functions, return and if/ else What's wrong?!



actually the format is C++'s because i learnt c++ before.


Yeah... that might be why. :smiley:

You wrote your quarter function incorrectly, for no semi colon after the function and before the corresponding bracket. :smiley:

Delete the semi colon after your quarter function and put the { in front of the function, which should work. :smiley:


As well as what @ragezapper said, you probably need to remove the quotation marks around number in your function:

var quarter = function("number")

should be

var quarter = function(number)



  • delete in 3rd line ;
  • in 13th line, you wrote " quater " but must be " quarter "


On line 6 you did not put a number in (quarter(). Here is my code on line 6.

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

It worked for me.