forked from M3-Academy/challenge-algorithms-v2.0
feat: adicionando solução do 10° desafio
This commit is contained in:
parent
ef2c7d7aef
commit
c9a298d9cd
@ -1,4 +1,5 @@
|
|||||||
export function longestWords(words) {
|
export function longestWords(words) {
|
||||||
// implementar logica aqui
|
// implementar logica aqui
|
||||||
|
let maxWord = Math.max(...words.map( elem => elem.length))
|
||||||
|
return words.filter(elem => elem.length === maxWord)
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user