Merge branch 'feature/sum'

This commit is contained in:
Marcela Mathias 2022-11-02 18:06:21 -03:00
commit 0696bbec7e

View File

@ -1,4 +1,6 @@
export function sum(values) {
// implementar logica aqui
}
if (values.length == 0) return 0;
const val = values.reduce((accumulator, value) => accumulator + value, 0);
return val;
}