sum

Math
since 3.4.0

Arguments

  • Array The array to iterate over.

Returns

number the sum.

Computes the sum of the values in array.

Example of Lodash _.sum

_.sum([4, 2, 8, 6]);
// => 20