Appearance
Returns the sum of a number array.
import { sum } from 'tsu' sum([1, 2, 3, 4, 5]) // 15 sum([]) // 0
/** * @param ns - The number array. * @returns The sum. */ function sum(ns: readonly number[]): number