Skip to content
On this page

sum

Add up the given array of numbers.

Example

sum([1, 2, 3]) // => 6
sum([]) // => 0

Playground

const { sum } = require('rhodash')
sum([1, 2, 3]) // => 6