feat(sum): Implementa função sum

This commit is contained in:
danielmoliaribarbosa 2022-10-28 15:05:20 -03:00
parent 264b1a1660
commit 8b72b62665

View File

@ -1,4 +1,8 @@
export function sum(values) { export function sum(values) {
// implementar logica aqui // implementar logica aqui
let soma = 0;
for (let i = 0; i < values.length; i++) {
soma += values[i];
}
return soma;
} }