Function / Returns / If / Else


#1

Can someone please tell me how to fix this??
I suck at JS so far :unamused:


#2

@viviennetran78: I'm still a beginner in JS but I know that in functions, where you need to calculate something to use on another part of your code, you should return the value.
And in this case, you're just printing it out.


#3

I wish i could help, but im stuck at another problem, but don't bring yourself down this is just the beginning!


#4

it should looks like this

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


#5

thank you it helped a lot! i totally forgot to define it first place!


#6