主题
max
js
_.max(array)计算 array 的最大值。如果 array 为空或为 false,则返回 undefined。
¥Computes the maximum value of array. If array is empty or falsey, undefined is returned.
新增于
¥Since
0.1.0
参数
¥Arguments
array(数组):要迭代的数组。¥
array(Array): The array to iterate over.
返回
¥Returns
(*):返回最大值。
¥()*: Returns the maximum value.
示例
¥Example
js
_.max([4, 2, 8, 6]);
// => 8
_.max([]);
// => undefined