Skip to content

Instantly share code, notes, and snippets.

@jonathanweiss
Created March 7, 2017 10:58
Show Gist options
  • Save jonathanweiss/3f529f3d5786b5e888ad7bdff036acab to your computer and use it in GitHub Desktop.
Save jonathanweiss/3f529f3d5786b5e888ad7bdff036acab to your computer and use it in GitHub Desktop.
Same example in ES6
'asdf klkl wererw cvxcxv'
.split(' ')
.reduce((list, word) => list.length < 2 ? [...list, word] : list, [])
.map(word => word.substring(0, 1).toUpperCase())
.join('');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment