Contact Free trial Login

isEven

isEven(Number): Boolean

Returns true if the given number is even, false if not.

Parameters

Name Description

number

A number to evaluate.

Example

This example indicates whether the input numbers are even.

Source

%dw 2.0
output  application/json
---
{
   "isEven" :
   [ isEven(0), isEven(1), isEven(2)]
}

Output

{
  "isEven" : [
    true,
    false,
    true
  ]
}