forked from M3-Academy/challenge-algorithms-v2.0
refactor(06): deleting lines
This commit is contained in:
parent
d1c7f499b0
commit
67b64bc155
@ -1,14 +1,8 @@
|
||||
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++)
|
||||
for(var i = 0; i < values.length;i++)
|
||||
{
|
||||
if(isNaN(values[i])){
|
||||
continue;
|
||||
}
|
||||
total += Number(values[i]);
|
||||
}
|
||||
return total;
|
||||
|
Loading…
Reference in New Issue
Block a user