JavaScript Math.min()
JavaScript Math.min()
The Math.min() method is used to return the number with the smallest value. Its opposite function is Math.max() which returns the maximum value among all values.
Syntax:-
Its syntax is:- Math.min(n1, ..., nX)
Return:-
Its return is:- number with the smallest value among arguments
Further Explanation:-
Parameter | Description |
---|---|
n1, ..., nX | Optional. One or more numbers to compare |