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

12 lines
200 B
JavaScript
Raw Normal View History

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