Others



JavaScript Math.min()


The Math.min(x) method used to returns the number with the lowest value in a list of arguments.

Syntax
Math.min(x)

Here, min() is a static method. Hence, we use it as Math.min().

Parameters
  • number1,number2,...,numberN - Numbers to be compared.
Return Value
  • Number - A lowest value of the given arguments.
Example
console.log(Math.min(11,58));  //11
console.log(Math.min(5,7,9,6,8,25,84,68,12));  //5
console.log(Math.min(-10,-15,-85));  //-85
console.log(Math.min(10,-100,-250,85)); //-250
console.log(Math.min(1.25,0.587,1.257)); //0.587
Try it Yourself

JavaScript Math Functions