Last active
June 28, 2020 01:47
-
-
Save newtomsoft/d1605e6fc681305e89599273c7cafb5e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function allLongestStrings(array) { | |
| let lengthMax = 0; | |
| array.forEach(word => lengthMax = word.length > lengthMax ? word.length : lengthMax); | |
| return array.filter(word => word.length == lengthMax); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment