| title | ms.custom | ms.date | ms.prod | ms.reviewer | ms.suite | ms.technology | ms.tgt_pltfrm | ms.topic | f1_keywords | dev_langs | helpviewer_keywords | ms.assetid | caps.latest.revision | author | ms.author | manager | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Math.min Function (JavaScript) | Microsoft Docs |
01/18/2017 |
windows-client-threshold |
|
language-reference |
|
|
|
a1d7dd85-27ef-45cd-aa2a-f8e80f0b2898 |
11 |
mikejo5000 |
mikejo |
ghogen |
Returns the smaller of a set of numeric expressions.
Math.min([number1[, number2[... [,numberN]]]])
The optional number1, number2, ..., numberN arguments are numeric expressions to be evaluated.
If no arguments are provided, the return value is equal to Number.POSITIVE_INFINITY. If any argument is NaN, the return value is also NaN.
The following code shows how to get the smaller of two expressions.
var x = Math.min(107 - 3, 48 * 90);
document.write(x);
// Output:
// 104 [!INCLUDEjsv1]