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

12 lines
196 B
JavaScript
Raw Normal View History

export function sum(values) {
// implementar logica aqui
2022-10-29 22:18:12 +00:00
var resultSoma = 0
for (var cont = 0; cont < values.length; cont++) {
resultSoma += values[cont]
}
return resultSoma
}