Created
June 8, 2017 20:27
-
-
Save awsp/296664f695d0a1d7cf3450889cce7865 to your computer and use it in GitHub Desktop.
Cap first letter of each word
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
'THIS IS A TEST'.toLowerCase().split(' ').map(function (value, key) { return value.charAt(0).toUpperCase() + value.slice(1); }).join(' '); | |
// print 'This Is A Test' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment