Answers for "how to write a code that upcase the first letter only"

0

js capitalize word

const capitalizeFirstLetter(string) => 
	string.charAt(0).toUpperCase() + string.slice(1).toLowerCase()
Posted by: Guest on December-27-2020
1

make first letter uppercase

const publication = "freeCodeCamp";
publication[0].toUpperCase() + publication.substring(1);
Posted by: Guest on December-27-2020

Code answers related to "how to write a code that upcase the first letter only"

Code answers related to "Javascript"

Browse Popular Code Answers by Language