#snippet #JavaScript
Posted on Sun, 07 Jan 2024Capitalize first letter of string using JavaScript
function capitalizeFirstLetter(string) {
return string[0].toUpperCase() + string.slice(1);
}
Capitalize first letter of string using JavaScript
function capitalizeFirstLetter(string) {
return string[0].toUpperCase() + string.slice(1);
}