JavaScript Math.abs()
JavaScript Math.abs()
The Math.abs() method is used to return the absolute value of a number.
Syntax:-
Its syntax is:- Math.abs(x)
Return:-
Its return is:- number representing the absolute value of the specific number
Further Explanation:-
Parameter | Description |
x | Required. A number. |