JavaScript Reference/Javascript Methods/abs
"abs()" Example
<html>
<body>
<button onclick="alert(Math.abs(-10));">ABS</button>
</body>
</html>
"abs()" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |Math |
+----------------+--------------------------------------------------------------+
"abs()" Syntax, Parameters and Note
Note:
Returns the absolute value.
Syntax:
Math.abs(param1)
Parameters:
param1 Required; the number to convert.