Feat(Desafio_2.10): Cria resposta desafio 2.10 #10

Merged
Rhayllon_Daudt merged 1 commits from Feature/Desafio_2.10 into develop 2022-10-30 06:13:06 +00:00

View File

@ -1,4 +1,10 @@
export function longestWords(words) {
// implementar logica aqui
let longest = ""
for (let word of words){
if (word.length > longest.length) longest = word;
}
let longest_words = words.filter(item => item.length >= longest.length)
return longest_words
}