Merge pull request 'feat(desafio10):desafio-completo' (#10) from feature/desafio10 into develop

Reviewed-on: #10
This commit is contained in:
Nicolas Rosa de Oliveira 2022-10-29 12:25:14 +00:00
commit 640b397803

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