Sums the numbers returned by a callback, starting at zero.
Visits elements in order, skips sparse array holes, and leaves the array unchanged.
Exceptions from the callback propagate to the caller.
Corresponds to Lodash's sumBy(values, iteratee) callback form, passing only
the current element. The callback is required and must return a number.
Lodash visits array holes with undefined and skips undefined callback results.
Its sum starts at the first defined value, which can preserve negative zero.
Sums the numbers returned by a callback, starting at zero. Visits elements in order, skips sparse array holes, and leaves the array unchanged. Exceptions from the callback propagate to the caller.
Corresponds to Lodash's
sumBy(values, iteratee)callback form, passing only the current element. The callback is required and must return a number. Lodash visits array holes withundefinedand skipsundefinedcallback results. Its sum starts at the first defined value, which can preserve negative zero.