fix(10-longestWords)otimiza o codigo

This commit is contained in:
Henrique Martins Silva 2022-10-30 12:22:17 -03:00
parent fd55e12640
commit 3d6b9dea46

View File

@ -27,12 +27,3 @@ export function longestWords(words) {
})
} return finalResult
}
// let palavra = [];
// for (let word = 0; word < words.length; word++) {
// if (palavra < word.length) palavra = word;
// }
// let palavraLonga = []
// for (let i = 0; i < palavra.length; i++) {
// if (i.length == palavra.length) palavraLonga = words[i];
// }
// return palavraLonga;