feat: resolve funcão sum

This commit is contained in:
José Gregorio Mata Rodríguez 2022-10-29 01:34:41 -02:00
parent 5325173f4c
commit cc1c140869

View File

@ -1,4 +1,12 @@
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;
}