JavaScript Reference/Javascript Methods/min

Материал из Web эксперт
Перейти к: навигация, поиск

"min()" Example

    
<html>
<body>
<button onclick="alert(Math.min(1, 2));">get the min value from two</button>
</body>
</html>



"min()" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |Math                                                          |
+----------------+--------------------------------------------------------------+



"min()" Syntax, Parameters and Note

Note:
Evaluates two numbers and returns the smaller one.
    
Syntax:
    
Math.min(param1, param2)
Parameters:
    param1   Required; the first number.
    param2   Required; the second number.