forked from M3-Academy/challenge-algorithms-v2.0
feat: adicionando solução do10° desafio
This commit is contained in:
parent
ef2c7d7aef
commit
f1231ee3bd
@ -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