Even Numbers
EasyAcc. 96.8%
+25 XP 8
Sorting Stocks
You might need to group items evenly to run batches properly without a leftover piece. The Modulo (%) symbol quickly identifies the remaining value after dividing elements. Even numbers will always cleanly leave a 0 remainder when divided by 2.
The Assignment
- Conduct the math formula num % 2.
- Compare if this remainder perfectly matches 0.
- Return whether the match is true or false.
01EXAMPLE 1
Input
num = 13Output
falseExplanation: 13 % 2 leaves 1 remainder.
Constraints
- Use the % operator.
- Return a boolean result.
FundamentalsMathOperators
JavaScriptSystem handles I/O — write your function only
Loading...
5 Hidden
Input Arguments
num13
Expected Output
false
Click RUN to test your solution