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 ] }

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub