Contact Free trial Login

isOdd

isOdd(Number): Boolean

Returns true if the number or numeric result of a mathematical operation is odd, false if not.

Parameters

Name Description

number

A number to evaluate.

Example

This example indicates whether the numbers are odd.

Source

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

Output

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

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.