JavaScript Math.min()
More Examples
let a = Math.min(5, 10);
let b = Math.min(0, 150, 30, 20, 38);
let c = Math.min(-5, 10);
let d = Math.min(-5, -10);
let e = Math.min(1.5, 2.5);
Try it Yourself »
Description
The Math.min()
method returns the number with the lowest value.
See Also:
The Math.max() MethodSyntax
Math.min(n1, n2,...)
Parameters
Parameter | Description |
n1, n2,... | Optional. One or more numbers to compare. |
Return Value
Type | Description |
Number | The lowest number of the arguments.Infinity if no arguments are given.NaN if one of the arguments is not a number. |
Browser Support
Math.min()
is an ECMAScript1 (JavaScriopt 1997) feature.
It is supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | Yes |