WMLScript abs() Function
The abs() function returns the absolute value of a number.
Syntax
n = Lang.abs(x)
Components | Description |
---|---|
n | The absolute value returned by the function. |
x | Calculate the absolute value of this number. |
Example
var a = Lang.abs(-5); var b = Lang.abs(-3.4);
Result
a = 5 b = 3.4