Contact Us 1-800-596-4880

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