Confirms the condition but has function definition error!


ar quarter = function(number){
return (number/4);

if (quarter = (3) % 3 === 0 ) {
console.log("A declaração é verdadeira");
} else {
console.log("A declaração é falsa");


you need to call the function inside the if condition:

if (quarter(3) % 3 === 0)

you can call function inside a if statement


persists the error message


can you provide me the url of the exercise?


course follows introduction javascript function return if and else;


first line:

ar quarter

sure you have var instead of ar?

the if statement should evaluate to true, so you might want to put in 12, or 24.

If problem persist, post an updated version of your code


thanks, did not know this, "you can call function inside an if statement."



yes you can, why couldn't it be? Anyway, this topic is old, i closed it