English
Appearance
Sum the elements of the array
function sum(arr: number[]): any;
import { sum } from 'rattail' const arr = [1, 2, 3, 4, 5] console.log(sum(arr)) // 15 console.log(sum([])) // 0
arr
The sum of the elements of the array