Function max
Source pub fn max(args: &[Value]) -> Result<Value, RuntimeError>
Expand description
获取数组中的最大值
返回数字数组中的最大值。
§返回值
Number - 数组中的最大值
- 空数组时抛出错误
- 数组包含非数字元素时抛出类型错误
Set NUMS [3, 7, 2, 9, 1]
Set MAXIMUM MAX(NUMS) // 9
Set SCORES [85.5, 92.0, 78.5, 95.5]
Set HIGHEST MAX(SCORES) // 95.5