forked from M3-Academy/challenge-algorithms-v2.0
feat: Resolvido questao sum
This commit is contained in:
parent
e9035b4a53
commit
9eb9524cf9
@ -1,4 +1,8 @@
|
|||||||
export function sum(values) {
|
export function sum(values) {
|
||||||
// implementar logica aqui
|
// implementar logica aqui
|
||||||
|
let result = 0;
|
||||||
|
for (let i = 0; i < values.length; i++) {
|
||||||
|
result += values[i];
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user