feature: resolve exercício 06-sum

This commit is contained in:
Andrea Matsunaga 2022-10-30 14:05:41 -03:00
parent adfcec5277
commit bbf4259fcb

View File

@ -1,4 +1,4 @@
export function sum(values) {
// implementar logica aqui
if(values.length < 1) return 0;
return values.reduce((previousValue, currentValue) => previousValue + currentValue);
}