challenge-algorithms-v2.0-c.../06-sum/index.js
2022-10-28 07:40:50 -04:00

9 lines
157 B
JavaScript

export function sum(values) {
// implementar logica aqui
function add(a, b) {
return a + b;
}
var soma = values.reduce(add, 0);
return soma;
}