refactor(06): deleting lines

This commit is contained in:
Matheus Brollo Dauter 2022-10-31 14:43:37 -03:00
parent d1c7f499b0
commit 67b64bc155

View File

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