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

12 lines
196 B
JavaScript

export function sum(values) {
// implementar logica aqui
var resultSoma = 0
for (var cont = 0; cont < values.length; cont++) {
resultSoma += values[cont]
}
return resultSoma
}