feat(desafio06):desafio-completo #6

Merged
nicolasrosadeoliveira merged 1 commits from feature/desafio06 into develop 2022-10-28 13:40:02 +00:00

View File

@ -1,4 +1,13 @@
export function sum(values) {
// implementar logica aqui
if (values.length === 0) {
return 0;
}
let sum = values.reduce(function(accumulator,value){
return accumulator + value;
})
return sum
}