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

6 lines
133 B
JavaScript

export function sum(values) {
// implementar logica aqui
return values.reduce((ac, value) => {
return ac += value;
}, 0);
}