Confirms the condition but has function definition error!


#1

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


#2

you need to call the function inside the if condition:

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

you can call function inside a if statement


#3

persists the error message


#4

can you provide me the url of the exercise?


#5

course follows introduction javascript function return if and else; https://www.codecademy.com/pt-BR/courses/javascript-beginner-pt-BR-hn3gi/1/3?curriculum_id=5355c2d8516bcbd912000009


#6

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


#7

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


#8

#9

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