SyntaxStudy
Sign Up

Even or Odd

JAVASCRIPT Easy +10 XP
Problem Description
Write a function `isEven(n)` that returns `true` if the number is even, or `false` if it is odd.

Example:
isEven(4) → true
isEven(7) → false
isEven(0) → true

Test Cases

1
Input: isEven(4)
Expected: 1
2
Input: isEven(7)
Expected:
3
Input: isEven(0)
Expected: 1
4
Input: isEven(-2)
Expected: 1
Your Solution