merge all challenges #1

Merged
Gabriel_Lehmann merged 19 commits from development into master 2022-10-30 04:26:03 +00:00
Showing only changes of commit 86bf0a21cc - Show all commits

View File

@ -1,4 +1,9 @@
export function longestWords(words) {
// implementar logica aqui
return words.reduce((longWords, currentWord) => {
if(!longWords[0] || longWords[0].length < currentWord.length) return [currentWord];
if(longWords[0].length > currentWord.length) return longWords;
longWords.push(currentWord);
return longWords;
},[])
}