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

6 lines
182 B
JavaScript

export function longestWords(words) {
// implementar logica aqui
let maxLength = Math.max(...words.map((e) => e.length));
return words.filter((e) => e.length === maxLength);
}