8/13 Return, If and Else


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

Really really stuck and have no idea where I've gone wrong but it keeps returning the message "You did not define the quarter function". Can anybody please give me a hint?


I copyed and pasted your code and it worked I don't know.


Hmmm I will try refreshing it and see what happens. Thanks!


I copied your code and I'm receiving the same error message. Can someone please help us.


I copied your code and it runs okay.


Erase the code above your own if you have not done so. The computer is reading its own example as part of your code. If you already did that then idk


I spent a week trying to figure out the problem. I was becoming obsessed and decided to start on another course and even drop coding all together, but your helped worked, so now I'm back in the game. Thanks!


Put the value in quarter () only 12, 24 and so..., because this will be divided by 4 then "RESULT" will be divided by 3, and to get 0 remainder the first "RESULT" should be completely divisible by 3. then only you will get 'True' statement.


I agree with netpro60473.


By running your code you acutally change variables and set values so it might occur that a fail run put some garbage in the memory that prevents you from going on even if the now fixed code is correct. So refreshing the page and thereby resetting built-in values and clearing the memory might often solve the problem (if the code is correct).


you just miss the semicolon ; on
return number/4 <-

add it and it should work

return number/4;