Help with 21.modulo and if/else


if (20 % 4===0) {
console.log("The first number is even");
} else {
console.log("The first number is odd");
this is my code, please help I cant find any mistakes, "there is a problem with your sintax"is writing there


Your code does pass, without errors. Not sure what the problem is on your end. It's worth noting that to determine parity (even/odd) we use 2 as the divisor (the modulus).

n % 2

is 0 if n is even, and 1 if n is odd.


Thank you for your help, but I am not good at English enough to understand your answer correctly, so I am still stucked.I tried to changed some numbers in code, but it still say :SyntaxError: expected expression, got '.'