Functions, return and if / else


#1

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.


#2

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.)


#3

Thank you bibleman13, success!


#4

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


#5

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