Figuring out Functions


#1

Hi everyone. I need help figuring out what's wrong with my code in Functions, return, and if else. Can I please get a few pointers?


#2

Can we see your code so we can help?


#3

Here it is:
// Define quarter here.
var quarter = function (number)
{
number/4;
};
if (quarter() % 3 === 0 ) {
console.log("The statement is true");
};
quarter(33);


#4

There are many things wrong with your code so I advise that you just use mine and compare them to spot mistakes:

// Define quarter here.

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");
}

#5

Thanks a lot. It was extremely helpful.