Function return and if / eles fixed


#1
<Doctype HTML/>
<HTML>
<body>
<P> i can not figure how to work out this code</p>
<p>// Define quarter here.
 
 var quarter = function(number) 
 if (4 % 3 === 0 ) {
    return number/4;
  console.log("The statement is true");
} else {
  console.log("The statement is false");
}<p/>
<p>could you help me?</p>
<body>
<html/>

#2

What's wrong ? did you follow your program logic first ?


#3

seems like your code got a little messed up:
The function needs to be wrapped in {} and the if should be moved done to the else.


#4

i got was not thinking properly but it is working fine now.
// Define quarter here.
var quarter = function(number)
{
return number/4;
}

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