Choose where you’d like to start

isEven

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,

ParameterData typeDescription
<variable>BOOLEANVariable which contains the result of the odd parity check (true/false)
<number>NUMBERThe 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'

Get Started Now

Execute