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

9 lines
166 B
JavaScript
Raw Permalink Normal View History

export function sum(values) {
// implementar logica aqui
2022-10-30 03:36:25 +00:00
let total = 0;
for (let i = 0; i < values.length; i++) {
total += values[i];
}
return total;
}