Check out v4 of the Fauna CLI
v4 of the Fauna CLI is now in beta. The new version introduces enhancements to the developer experience, including an improved authentication workflow. To get started, check out the CLI v4 quick start. |
Math.abs()
Get the absolute value of a number.
Description
The Math.abs()
method returns the absolute value of val, which is a
Number.
Examples
-
Get the absolute value of an integer:
Math.abs(5)
5
-
Get the absolute value of a negative integer:
Math.abs(-5)
5
-
Get the absolution value of a real number:
Math.abs(-5.1)
5.1
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!