From 0f2f65fcf0bbb5b8b273185e5e2abf64acc1f1a1 Mon Sep 17 00:00:00 2001 From: Vinicius Date: Thu, 3 Nov 2022 01:15:26 -0200 Subject: [PATCH] fix(longesWords): conserta nome do parametro --- 10-longestWords/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/10-longestWords/index.js b/10-longestWords/index.js index eca2aee..904db4e 100644 --- a/10-longestWords/index.js +++ b/10-longestWords/index.js @@ -2,10 +2,10 @@ export function longestWords(words) { // implementar logica aqui let comp = 0; let resultado = []; - for (i in text) { - if (comp < text[i].length) { - comp = text[i].length; - resultado.push(text[i]); + for (i in words) { + if (comp < words[i].length) { + comp = words[i].length; + resultado.push(words[i]); } } if (resultado.length > 1) {