Merge pull request 'feat(desafio06):desafio-completo' (#6) from feature/desafio06 into develop

Reviewed-on: #6
This commit is contained in:
Nicolas Rosa de Oliveira 2022-10-28 13:40:01 +00:00
commit c41098172f

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
}