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

5 lines
190 B
JavaScript
Raw Normal View History

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