#8 error keeps poping up even though i says it is true


#1



https://www.codecademy.com/en/courses/javascript-beginner-en-6LzGd/1/3?curriculum_id=506324b3a7dffd00020bf661#


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


// Define quarter here.
var quarter = function(number) {
    return (number / 3);
};




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


#2
divide into halves    =>  n / 2

divide into thirds    =>  n / 3

divided into quarters =>  n / 4

So the function should be returning number / 4

Now we are instructed to set it up so that the conditional yields true, meaning the return value from the quarter() function has to be evenly divisible by 3. This suggests a Least Common Multiple type of problem. What is the LCM of 3 and 4? Their product, 3 * 4 or 12. That means our argument being sent to the function should be a multiple of 12 (or zero).

12 / 4 is divisible by 3
24 / 4 likewise
36, 48, 60, ... all valid arguments.