6 lines
145 B
TypeScript
6 lines
145 B
TypeScript
|
export class ArraySum {
|
||
|
static arraySum(arr: any[]): number {
|
||
|
return arr.reduce((accumulator, current) => accumulator + current, 0);
|
||
|
}
|
||
|
}
|