Contact Us 1-800-596-4880

round

round(Number): Number

Rounds a number up or down to the nearest whole number.

Parameters

Name Description

number

The number to evaluate.

Parameters

Name Description

number

The number to round.

Example

This example rounds decimal numbers to the nearest whole numbers.

Source

%dw 2.0
output application/json
---
[ round(1.2), round(4.6), round(3.5) ]

Output

[ 1, 5, 4 ]