If/Else statement: Quarter(number) fxn


#1



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");
};


#2

bad idea.

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


#3

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.


#4

Oh wait!

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


#5

did you make it work and do you understand now?

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


#6

I do understand now. Thank you!


#7