forked from M3-Academy/challenge-algorithms-v2.0
6 lines
145 B
JavaScript
6 lines
145 B
JavaScript
export function sum(values) {
|
|
let sumAll = 0;
|
|
for (let i = 0; i < values.length; i++) {
|
|
sumAll = sumAll + values[i];
|
|
} return sumAll;
|
|
} |