DEV Community

loading...

Discussion on: How to uppercase the first letter of a string in JavaScript

Collapse
inhuofficial profile image
InHuOfficial

Pretty much nailed it on the ways to do it!

With a tiny rework you can make it so that it works on the prototype as well! (also I might rename it to "capitaliseFirst" just in case you ever want a function to capitalise the whole sentence!)

Collapse
_codax_ profile image
Alexis Guzman Author

Awesome. Thanks for the feedback! 👍