From d02c19c6c08dbd428bba4af50b7f89125246b847 Mon Sep 17 00:00:00 2001 From: Affonsok Date: Sun, 30 Oct 2022 15:44:35 -0300 Subject: [PATCH] =?UTF-8?q?feat(sum):=20Responde=20fun=C3=A7=C3=A3o=2006?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 06-sum/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/06-sum/index.js b/06-sum/index.js index 1720b26..315dafd 100644 --- a/06-sum/index.js +++ b/06-sum/index.js @@ -1,4 +1,8 @@ export function sum(values) { // implementar logica aqui - + let soma = 0; + for( let index = 0; index < values.length; index += 1 ) { + soma = soma + values [ index ] ; + } + return soma; } \ No newline at end of file