I dont get it. I did all it asked from me


#1

Help NB
8.Funtions return and if/else.

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

Did you remember to call quarter() inside the if statement with a value that would cause it to print 'The statement is true'?

// Define quarter here.
var quarter = function(number){
    return number /4;
    }
    
if (quarter(number) % 3 === 0 ) {
  console.log("The statement is true");
} else {
  console.log("The statement is false");
}
quarter(12);

#2

Dont call the function in end as you did quarter(12);
Just replace the number in if (quarter(number) % 3 === 0 ) with 12
The code will look like this

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

#3

Thank you so much!
I really appreciate it.


#4

Dont mention it :slight_smile:


#5

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