Math.min()
ES1+Returns the smallest of the zero or more numbers given as input parameters.
Syntax
Math.min(value1, value2, ...)Parameters
values number Zero or more numbers
Return Value
number
The smallest of the given numbers, or Infinity if no arguments
Examples
JavaScript
console.log(Math.min(1, 3, 2));
console.log(Math.min(-1, -3, -2));
console.log(Math.min(...[4, 5, 6])); Output:
// 1
-3
4