From 5c370852996d650eeaa98fd7a3b268ddd653d5aa Mon Sep 17 00:00:00 2001 From: Gabriel Ferraz Date: Fri, 28 Oct 2022 14:53:27 -0300 Subject: [PATCH] =?UTF-8?q?(06-sum):=20implementa=C3=A7=C3=A3o=20d?= =?UTF-8?q?o=20c=C3=B3digo=20sum?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 06-sum/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/06-sum/index.js b/06-sum/index.js index ebc2ee1..902f0e1 100644 --- a/06-sum/index.js +++ b/06-sum/index.js @@ -1,4 +1,6 @@ export function sum(values) { // implementar logica aqui - + let sums = 0; + values.forEach(item => sums += item); + return sums } \ No newline at end of file