_.sum(array)
Computes the sum of the values in array
.
Since
3.4.0
Arguments
-
array
(Array): The array to iterate over.
Returns
(number): Returns the sum.
Example
1 2 | _.sum([4, 2, 8, 6]); // => 20 |
_.sum(array)
Computes the sum of the values in array
.
3.4.0
array
(Array): The array to iterate over.(number): Returns the sum.
1 2 | _.sum([4, 2, 8, 6]); // => 20 |
Designed by : w10schools
service@w10schools.com
Please login to continue.