Created
May 15, 2017 18:03
-
-
Save kmaida/f04621bf476e56cb3b249356c39be2f6 to your computer and use it in GitHub Desktop.
Capitalize string with JS
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) { | |
// Capitalize first letter of string | |
return str.charAt(0).toUpperCase() + str.slice(1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment