#snippet #JavaScript

Posted on Sun, 07 Jan 2024

Capitalize first letter of string using JavaScript

function capitalizeFirstLetter(string) {
	return string[0].toUpperCase() + string.slice(1);
}