feat(desafio06):desafio-completo

This commit is contained in:
Nicolas Oliveira 2022-10-28 10:39:05 -03:00
parent 2ed084cc0b
commit 4a24ab3563

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
}