Created
August 21, 2016 04:52
-
-
Save ipassynk/d333ff0f235bfe054d3bae3a0d7c37a6 to your computer and use it in GitHub Desktop.
This file contains 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
let words = "aaa ggg aaa ggg aaa ffff aaaAAAAAAA ggg aaa ggg aaa fff rrr aaa"; | |
let y = _.compose( | |
_.reduce((x,y)=>x.length>y.length?x:y,""), | |
_.split(' ') | |
)(words); | |
let y = _.compose( | |
_.last, | |
_.sortBy(_.size), | |
_.split(' ') | |
)(words); | |
console.log(y); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment