Function for checking the parity of a number
JavaScript
Easy
functions
Task «Function for checking the parity of a number»
Write a function isEven that takes an integer and returns true if it is even, and false otherwise. Use the % operator. Do not use built-in Math functions. The input is a single integer. Output the result as the string "true" or "false".
Input Format
One integer n (-1000 <= n <= 1000).
Output Format
String "true" or "false".
Examples
Example 1
INPUT
4
OUTPUT
true
Example 2
INPUT
7
OUTPUT
false
main.js