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.

Source

%dw 2.0
output application/json
---
{
   "integer" : isInteger(1.1),
   "integer" : isInteger(1)
}

Output

{
   "integer": false,
   "integer": true
}