challenge-algorithms-v2.0-a.../06-sum/index.js
2022-11-02 14:50:03 -03:00

10 lines
121 B
JavaScript

export function sum(values) {
let sum = 0;
values.forEach((element) => {
sum += element;
});
return sum;
}