Capitalize the first letter of a string in javascript

var capitalizeMe = "capitalize the first letter of a string in javascript";

var capitalized = capitalizeMe[0].toUpperCase() + capitalizeMe.substring(1);

console.log(capitalized);

// Capitalize the first letter of a string in javascript

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

DMCA.com Protection Status