feat: solucao longestWords

This commit is contained in:
Rafael Sampaio de Oliveira 2022-10-28 16:54:30 -03:00
parent c6f6df9c59
commit dfe39deb46

View File

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