From d4646cd89ef2494412e9e77ce26be3ade8a4b845 Mon Sep 17 00:00:00 2001 From: Rafael Sampaio Date: Fri, 28 Oct 2022 10:09:51 -0300 Subject: [PATCH] feat: solucao sum --- 06-sum/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/06-sum/index.js b/06-sum/index.js index ebc2ee1..9cd7e9c 100644 --- a/06-sum/index.js +++ b/06-sum/index.js @@ -1,4 +1,5 @@ export function sum(values) { // implementar logica aqui - -} \ No newline at end of file + let sum = values.reduce((sum, number) => sum + number, 0); + return sum; +} -- 2.34.1