Modulo and if / else


#1

if("True" ) {
console.log(14%3===2)
}
else {
console.log("The first number is odd");
}
Oops, try again. It looks like your comparison in line 5 doesn't evaluate to true! Check the Hint if you need help.

what's my error?


#2

This is the code you start with:

if(  ) {
    console.log("The first number is even");
} else {
    console.log("The first number is odd");
}

now you want to add the check statement with modulo operator (14%3===2) inside the brackets of if: if (/* here */)


#3

thank you :slightly_smiling:


#4

Yes ... thanks too. I forgot the ===

:slight_smile:


#5