longestWords atualizado c/ erro

This commit is contained in:
Nathalia Sardou 2022-10-31 22:31:44 -03:00
parent 9e1b18baef
commit 145f69c047

View File

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