Created
April 16, 2013 01:54
-
-
Save johnsmith17th/5392757 to your computer and use it in GitHub Desktop.
Capitalize and uncapitalize of string.
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
function capitalize(str) { | |
return (str.charAt(0).toUpperCase() + str.slice(1)); | |
} | |
function uncapitalize(str) { | |
return (str.charAt(0).toLowerCase() + str.slice(1)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment