feat(06-sum):completead sixth challenge

This commit is contained in:
Marcello Rodrigues Martins 2022-10-29 16:35:30 -03:00
parent c6f6df9c59
commit 42a6fa7e73

View File

@ -1,4 +1,6 @@
export function sum(values) { export function sum(values) {
// implementar logica aqui // implementar logica aqui
return values.reduce((totalnum, atualnum) => {
return totalnum + atualnum
}, 0)
} }