forked from M3-Academy/challenge-algorithms-v2.0
Revert "add longestWords logic"
This reverts commit 923c138af62d0640b4942122dd502854b569bfbf.
This commit is contained in:
parent
ff6187b0df
commit
9729792910
@ -1,11 +1,4 @@
|
||||
export function longestWords(words) {
|
||||
let longest = "";
|
||||
|
||||
for (const word of words) {
|
||||
if (word.length > longest.length) {
|
||||
longest = word;
|
||||
}
|
||||
}
|
||||
|
||||
return words.filter((word) => word.length === longest.length);
|
||||
}
|
||||
// implementar logica aqui
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user