feat(desafio10):desafio-completo

This commit is contained in:
Nicolas Oliveira 2022-10-29 09:24:01 -03:00
parent 5767c61eb4
commit 50c4836b9a

View File

@ -1,4 +1,14 @@
export function longestWords(words) {
// implementar logica aqui
let newArr = [];
let long = 0;
words.forEach(function(element){
if(element.length > long){
long = element.length
}
});
newArr = words.filter(element =>
element.length == long
);
return newArr;
}