forked from M3-Academy/challenge-algorithms-v2.0
feat: solucao longestWords
This commit is contained in:
parent
c6f6df9c59
commit
dfe39deb46
@ -1,4 +1,5 @@
|
|||||||
export function longestWords(words) {
|
export function longestWords(words) {
|
||||||
// implementar logica aqui
|
// implementar logica aqui
|
||||||
|
let maxLength = Math.max(...words.map((e) => e.length));
|
||||||
|
return words.filter((e) => e.length === maxLength);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user