development #1

Merged
MarcelloMartins merged 23 commits from development into master 2022-10-31 21:45:09 +00:00
Showing only changes of commit 146c2a9cc3 - Show all commits

View File

@ -1,4 +1,12 @@
export function longestWords(words) { export function longestWords(words) {
// implementar logica aqui // implementar logica aqui
let lista = [];
words.forEach(palavra => {
if(!lista[0] || lista[0].length < palavra.length){
lista = [palavra]
} else if(lista[0].length == palavra.length){
lista.push(palavra)
}
});
return lista;
} }