Math min() method
JavaScript Math min() method
Last Updated : 17 Mar 2025
The JavaScript math min() method compares the given numbers and returns the minimum value.
Syntax
The min() method is represented by the following syntax:
Parameter
num1,num2,...,numN - Numbers to be compared..
Return
A minimum value of the given numbers.
JavaScript Math min() method example
Here, we will understand min() method through various examples.
Example 1
Let's see a simple example to print the minimum value of the given numbers.
Output:
Example 2
Let's see an example to print the minimum value of the given array.
Output: