Functions, return and if / else/ I'm stuck! please help


#1

Hello everybody :slight_smile:

I can't figure out what I have done wrong:

var quarter = function(number); {
return number/4;
}

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


#2

this line:

var quarter = function(number) {

the semi-colon interrupts the function, remove the semi-colon.


#3

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