Math.min()函数JavaScript
min()Math对象的函数接受多个数字,并返回其中最大的数字。
如果将单个数字传递给此函数,它将返回相同的
并且,如果不传递任何参数,它将返回无穷大。
语法
其语法如下
Math.min(48, 148, 3654);
示例
<html>
<head>
<title>JavaScript Example</title>
</head>
<body>
<script type="text/javascript">
var result = Math.min(48, 148, 3654);
document.write("Minimum of the given numbers: "+result);
</script>
</body>
</html>输出结果
Maximum of the given numbers: 48
热门推荐
10 入学校简短祝福语
11 2026新年祝福语简短语
12 小寒健康祝福语大全简短
13 新年发给客户祝福语简短
14 新年送老师简短祝福语
15 关于早晨的祝福语简短
16 幸福卡片祝福语英文简短
17 春节送祝福语简短的
18 结业蛋糕男生祝福语简短