challenge-algorithms-v2.0-r.../10-longestWords/index.js

6 lines
182 B
JavaScript
Raw Normal View History

export function longestWords(words) {
2022-10-28 19:54:30 +00:00
// implementar logica aqui
let maxLength = Math.max(...words.map((e) => e.length));
return words.filter((e) => e.length === maxLength);
}