isEven
Table of Contents
Overview
The isEven function takes a number as argument and returns a true/false based on the parity of the number passed to it.
Note:
- All values passed to the list should be integers.
- The function is allowed to be saved with decimals but is discouraged from use as parity cannot be determined for decimals.
Return Type
- BOOLEAN
Syntax
<variable> = <number>.isEven();
(OR)
<variable> = isEven(<number>);
where,
Parameter | Data type | Description |
<variable> | BOOLEAN | Variable which contains the result of the odd parity check (true/false) |
<number> | NUMBER | The number value on which the odd parity check is performed. |
Examples
1) number=1234; result = number.isEven(); info result; // Returns 'true'
2) number=111; result = isEven(number); info result; // Returns 'false'