cic-staff-client/src/app/_helpers/array-sum.ts

6 lines
145 B
TypeScript
Raw Normal View History

function arraySum(arr: Array<number>): number {
return arr.reduce((accumulator, current) => accumulator + current, 0);
2020-12-05 07:29:59 +01:00
}
2021-05-10 18:15:25 +02:00
export { arraySum };