abs
Returns the absolute value of a number. abs
will also work on a string if the string only contains a number
Input
-
{{ 4 | abs }}
Output
-
4
Input
-
{{ -17 | abs }}
Output
-
17
Input
-
{{ '19.86' | abs }}
Output
-
19.86