forked from M3-Academy/challenge-algorithms-v2.0
10 lines
121 B
JavaScript
10 lines
121 B
JavaScript
export function sum(values) {
|
|
let sum = 0;
|
|
|
|
values.forEach((element) => {
|
|
sum += element;
|
|
});
|
|
|
|
return sum;
|
|
}
|