Computes the maximum of the values returned by the iteratee for each element in the array.
maximum
iteratee
The array to iterate over.
The iteratee invoked per element.
The maximum value.
1.0.0
maxByFn([1, 2, 3], number => number); // => 3 Copy
maxByFn([1, 2, 3], number => number); // => 3
maxByFn([{ a: 1 }, { a: 2 }, { a: 3 }], ({ a }) => a); // => 3 Copy
maxByFn([{ a: 1 }, { a: 2 }, { a: 3 }], ({ a }) => a); // => 3
Computes the
maximumof the values returned by theiterateefor each element in the array.