dev #1

Merged
matheusbrollodauter merged 11 commits from dev into master 2022-11-02 16:07:43 +00:00
Showing only changes of commit d1c7f499b0 - Show all commits

View File

@ -1,8 +1,15 @@
export function sum(values) {
// implementar logica aqui
let soma = 0
for (let index = 0; index < values.lenght; index += 1) {
soma = soma + values[index];
if (toString.call(values) !== "[object Array]")
return false;
var total = 0;
for(var i=0;i<values.length;i++)
{
if(isNaN(values[i])){
continue;
}
return soma;
total += Number(values[i]);
}
return total;
}