Skip to content

sum

Calculates the sum of values in an array of numbers.

Usage

ts
import { sum } from 'rattail'

sum([1, 2, 3]) // return 6

Arguments

ArgTypeDefaults
arrnumber[]

Return

Type
number