Skip to content

Latest commit

 

History

History
55 lines (46 loc) · 1.35 KB

File metadata and controls

55 lines (46 loc) · 1.35 KB
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
devlang-javascript
language-reference
min
JavaScript
TypeScript
DHTML
min method
a1d7dd85-27ef-45cd-aa2a-f8e80f0b2898
11
mikejo5000
mikejo
ghogen

Math.min Function (JavaScript)

Returns the smaller of a set of numeric expressions.

Syntax

Math.min([number1[, number2[... [,numberN]]]])  

Remarks

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.

Example

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  

Requirements

[!INCLUDEjsv1]

See Also

Math.max Function