feat(06-sum): Cria a função

This commit is contained in:
Leonardo Pereira Rocha 2022-10-28 21:19:21 -03:00
parent fbe17ccd07
commit d51aa1b44b

View File

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