Last active
October 10, 2020 06:56
-
-
Save rohitsaini1196/69ef2f9a40fa90427633184c54d17206 to your computer and use it in GitHub Desktop.
JavaScript Capitalize first letter of the string. You can use it in react js as well.
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 ucFirstJS(string) | |
{ | |
return string.charAt(0).toUpperCase() + string.slice(1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment