forked from M3-Academy/challenge-algorithms-v2.0
12 lines
200 B
JavaScript
12 lines
200 B
JavaScript
export function sum(values) {
|
|
// implementar logica aqui
|
|
let suma = 0;
|
|
let i = 0;
|
|
if (values) {
|
|
for (i = 0; i < values.length; i++){
|
|
suma+= values[i];
|
|
}
|
|
}
|
|
return suma;
|
|
|
|
} |