Abs

Copied!
( value )

Description

The Abs function is used to get the absolute value of a number.

Parameters

Parameter Type Definition and Requirements

value

Number

Take the absolute value of this argument.

Returns

A number which is the absolute value of a numeric input argument.

Examples

The following query returns the absolute value of -100:

Copied!
(-100)
100
Query metrics:
  •    bytesIn:  12

  •   bytesOut:  16

  • computeOps:   1

  •    readOps:   0

  •   writeOps:   0

  •  readBytes:   0

  • writeBytes:   0

  •  queryTime: 2ms

  •    retries:   0

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!