Contact Free trial Login

isInteger

isInteger(Number): Boolean

Returns true if the given number is an integer (which lacks decimals), false if not.

Parameters

Name Description

number

The number to evaluate.

Example

This example indicates whether the input is an integer. Note numbers within strings get coerced to numbers.

Source

%dw 2.0
output application/json
---
[ isLeapYear(locDT1), isLeapYear(locDT2), isInteger("1") ]

Output

[ false, true, true ]