2022-10-27 15:07:13 +00:00
|
|
|
export function sum(values) {
|
|
|
|
// implementar logica aqui
|
2022-10-28 18:29:57 +00:00
|
|
|
if (values.length === 0) {
|
|
|
|
return 0;
|
|
|
|
} else {
|
|
|
|
let soma = values.reduce(function (soma, i) {
|
|
|
|
return soma + i;
|
|
|
|
});
|
|
|
|
return soma;
|
|
|
|
}
|
2022-10-27 15:07:13 +00:00
|
|
|
}
|