Last active
March 7, 2017 10:29
-
-
Save jonathanweiss/84dd5e9c8d80a7784f8540d6735574dc to your computer and use it in GitHub Desktop.
Another functional programming example for Raphael
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
'asdf klkl wererw cvxcxv' | |
.split(' ') | |
.reduce(function(list, word){ | |
if (list.length < 2) { | |
list.push(word); | |
} | |
return list; | |
}, []) | |
.map(function(word) { | |
return word | |
.substring(0, 1) | |
.toUpperCase() | |
}) | |
.join(''); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment