Functions, return and if / else


#1


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


I'd like to know what's wrong on my code? i think i made it pretty right.


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

quarter(12);

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


#2

hello @allenkaojr
Lets read instructions.

Call the function inside the if statement's condition (and put in a parameter value!) such that "The statement is true" is printed to the console.

We are missing something ?


#3

thanks ! i finally made it, really appreciate!


#4

Good work ! :thumbsup:


#5

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