diff --git a/10-longestWords/index.js b/10-longestWords/index.js index a98d2d8..f18a6d4 100644 --- a/10-longestWords/index.js +++ b/10-longestWords/index.js @@ -1,4 +1,5 @@ export function longestWords(words) { - // implementar logica aqui - -} \ No newline at end of file + // implementar logica aqui + let maxLength = Math.max(...words.map((e) => e.length)); + return words.filter((e) => e.length === maxLength); +}