Math.min(value1, value2, ...)
Parameters: This method accepts a single parameter that can be used n number of times as mentioned above and described below:
- value: These values are sent to math.min() method for finding the largest.
Return Value: The Math.min() method returns the smallest of the given numbers.
Below are examples of the Math min() Method.
When positive numbers are passed as parameters: 2
Example 2: When negative numbers are passed as parameters.
Result : -32
Example 3: When no parameters are passed.
Result : Infinity
Program 3: When NaN is passed as a parameter.
Result : NaN
- Google Chrome 1 and above
- Internet Explorer 3 and above
- Firefox 1 and above
- Opera 3 and above
- Safari 1 and above