feat: adicionando solução do 10° desafio

This commit is contained in:
Ana Carolina Duarte Cavalcante 2022-10-28 08:57:42 -03:00
parent ef2c7d7aef
commit c9a298d9cd

View File

@ -1,4 +1,5 @@
export function longestWords(words) {
// implementar logica aqui
let maxWord = Math.max(...words.map( elem => elem.length))
return words.filter(elem => elem.length === maxWord)
}