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

6 lines
155 B
JavaScript
Raw Normal View History

export function sum(values) {
// implementar logica aqui
2022-10-30 02:23:48 +00:00
return values.reduce((somaTotal, numeroAtual) => {
return somaTotal + numeroAtual
},0)
}