Created
April 12, 2017 02:56
-
-
Save novalagung/4c03f52f5a4b52dd210d94699af1fa1f 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 letterCase(text) { | |
| return text.split(" ").map(function (d) { | |
| if (d.length == 0) return d | |
| return d[0].toUpperCase() + d.slice(1).toLowerCase() | |
| }).join(" ") | |
| } | |
| letterCase("LOREM IPsum DOLOT") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment