6. Check If Even

Given an integer number. Write a function bool IsEven(int number) that returns true if the number is even, and false if it is odd.
Example 1
Input: number = 7
Output: false
Explanation: 7 divided by 2 gives a remainder of 1
Example 2
Input: number = 4
Output: true
Explanation: 4 is divisible by 2 with no remainder
Example 3
Input: number = 0
Output: true
Explanation: 0 is considered an even number
easy
JavaScript
Loading...
Line 1, Char 1