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

6 lines
155 B
JavaScript

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