challenge-algorithms-v2.0-E.../06-sum/index.js

9 lines
163 B
JavaScript

export function sum(values) {
// implementar logica aqui
let resultSum = 0;
values.forEach(element => {
resultSum += element;
});
return resultSum
}