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

6 lines
145 B
TypeScript
Raw Normal View History

2020-12-05 07:29:59 +01:00
export class ArraySum {
static arraySum(arr: any[]): number {
return arr.reduce((accumulator, current) => accumulator + current, 0);
}
}