返回一组数字中的最大值。
带有一个参数的 max()
版本将其解释为一组数字,并返回最大的数字。
带有两个或更多参数的 max()
版本将它们解释为单独的数字,并返回最大的数字。
示例
语法
max(n0, n1)
max(nums)
参数
n0
数字:
要比较的第一个数字。
n1
数字:
要比较的第二个数字。
nums
数字[]:
要比较的数字。
返回值
数字: 最大值。
This page is generated from the comments in src/math/calculation.js . Please feel free to edit it and submit a pull request!