_.mean

_.mean(array)

source npm package

Computes the mean of the values in array.

Since

4.0.0

Arguments

  1. array (Array): The array to iterate over.

Returns

(number): Returns the mean.

Example

_.mean([4, 2, 8, 6]);
// => 5