forked from M3-Academy/challenge-algorithms-v2.0
feat: criar algoritmo que realize a soma dos valores contidos na array
This commit is contained in:
parent
31c440491f
commit
53eee52952
@ -1,4 +1,9 @@
|
||||
export function sum(values) {
|
||||
// implementar logica aqui
|
||||
var soma = 0;
|
||||
for (var i = 0; i < values.length; i++) {
|
||||
soma += values[i];
|
||||
}
|
||||
return soma;
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user