2022-10-27 15:07:13 +00:00
|
|
|
export function sum(values) {
|
|
|
|
// implementar logica aqui
|
2022-11-01 04:18:35 +00:00
|
|
|
let total = 0;
|
|
|
|
for (let i = 0; i < values.length; i++) {
|
|
|
|
total += values[i]
|
|
|
|
}
|
|
|
|
return total
|
|
|
|
/* return values.reduce((acumulador, valorAtual) => acumulador + valorAtual, 0) */
|
2022-10-27 15:07:13 +00:00
|
|
|
}
|