feature/algoritmos #1

Merged
LeonardoPereiraRocha merged 10 commits from feature/algoritmos into master 2022-11-02 20:24:57 +00:00
Showing only changes of commit d11374eae2 - Show all commits

View File

@ -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);
}