8. Functions, return and if/else


#1

Hi guys! I keep getting an error which reads like this:

Oops, try again. Hmm, it looks like your quarter function doesn't return -25 for -100.

My Code looks like this:


// Define quarter here.
var quarter = function(number){
    number / 4;
}

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


#2

Hi this part

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

this line

number / 4;

it's missing teh return key like..

return number / 4;

#3

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