sumar
v0.0.2
Published
Sum all the values of an array
Downloads
8
Maintainers
Readme
sumar
Sum all the values of an array
Install
$ npm install --save sumar
Usage
const sum = require('sumar')
console.log(sum([]))
// => 0
console.log(sum([1]))
// => 1
console.log(sum([0, 1, 2, 3]))
// => 6
console.log(sum([27, 421, -8, 0, -154, 23, 11, 256]))
// => 576
License
MIT © Nicolás Quiroz