generate random string with 1capital letter followed by small letter in javascript code example
Example: make random letter capital in string javascript
var string = "freeCodecamp";
function capitalizeFirstLetter(str) {
return str.charAt(0).toUpperCase() + str.slice(1);
}
capitalizeFirstLetter(string); // Returns "FreeCodecamp"