diff --git a/10-longestWords/index.js b/10-longestWords/index.js index a98d2d8..57943c3 100644 --- a/10-longestWords/index.js +++ b/10-longestWords/index.js @@ -1,4 +1,10 @@ export function longestWords(words) { - // implementar logica aqui - + let longWord = ""; + let word; + for(word of words) { + if (word.length > longWord.length){ + longWord = word; + } + } + return words.filter((word) => word.length === longWord.length); } \ No newline at end of file