Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 549 Bytes

dw-core-functions-abs.adoc

File metadata and controls

41 lines (28 loc) · 549 Bytes

abs

abs(number: Number): Number

Returns the absolute value of a number.

Parameters

Name Description

number

The number to evaluate.

Example

This example returns the absolute value of the specified numbers.

Source

%dw 2.0
output application/json
---
[ abs(-2), abs(2.5), abs(-3.4), abs(3) ]

Output

[ 2, 2.5, 3.4, 3 ]