What is "Functions, return and if / else" asking me to do?


#1


The attached code has the answer to the question but I just don't understand what the question wants or what is really going on.

From what I can tell you create a function with a parameter but don't actually give it the parameter, that makes some kind of loop that will make 12 magically be the value.

Its the first exercise that I don't get and I keep staring at it getting angry.


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


// Define quarter here.
var quarter = function(number) {
console.log("number/4");
return number/4
};

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


#2

You are using the number parameter in return number/4.


#3

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