Computes the maximum value of array. If array is empty or falsey, undefined is returned.
array
undefined
The array to iterate over.
Returns the maximum value.
5.6.0
_.max([4, 2, 8, 6]);// => 8_.max([]);// => undefined Copy
_.max([4, 2, 8, 6]);// => 8_.max([]);// => undefined
Computes the maximum value of
array
. Ifarray
is empty or falsey,undefined
is returned.