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

6 lines
144 B
JavaScript

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