If/Else statement: Quarter(number) fxn


It keeps telling me illegal return statement. But I copied that from someone else's post. IDK why its illegal.

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

if (quarter(96) % 3 === 0 ) {
  return number/4;
  console.log("The statement is true");
else {
  console.log("The statement is false");


bad idea.

anyway, what is the purpose of return number/4; inside your if clause?


Well...it was my answer and I thought it was confirmed in another post.

The instructions in the hint say "This is a little tricky so let's take it slow. The code in the { } in the function should be

return number/4"

But Im not sure where it supposed to go.


Oh wait!

I was carelessly attempting debugging and left it there. It fixed it immediately.


did you make it work and do you understand now?

If you need more help, post an updated version of your code


I do understand now. Thank you!