challenge-algorithms-v2.0-A.../06-sum/index.js

9 lines
189 B
JavaScript
Raw Normal View History

export function sum(values) {
// implementar logica aqui
2022-10-29 03:28:27 +00:00
var sum = values;
var soma = 0;
for (let i = 0; i < sum.length; i++) {
soma += sum[i]
}
return soma;
}