development #11

Merged
SavioCarvalhoMoraes merged 20 commits from development into master 2022-10-30 18:40:05 +00:00
Showing only changes of commit 57a410151f - Show all commits

View File

@ -1,4 +1,15 @@
export function longestWords(words) {
// implementar logica aqui
}
let vetWords = [];
for (let index = 0; index < words.length; index++) {
if (vetWords.length === 0) {
vetWords.push(words[index]);
} else if (vetWords[0].length < words[index].length) {
vetWords = [];
vetWords.push(words[index]);
} else if (vetWords[0].length === words[index].length) {
vetWords.push(words[index]);
}
}
return vetWords;
}