Functions, return and if / else


In need of help!!!

</ Define quarter here.

var quarter = function (number)
{ var val = number /4;}
console.log (val);

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

Replace this line with your code.


first, not sure why you added a variable there. get rid of it. Second you need to return number/4 not console.log a var. Specifically in the instructions it asks you to return which is why no variable is needed. Second, you need to put a number between () in your if quarter statement. Something that is % by 3 that equal 0 obviously. (Another way to think about it is a 3 to the 3rd power is what number.)


Thank you bibleman13, success!


great!!! happy to help! Good luck with the rest of your coding! :smiley:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.