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

8 lines
147 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
}
export {
arraySum
};