📅  最后修改于: 2022-03-11 15:03:50.083000             🧑  作者: Mango
var string = "freeCodecamp";
function capitalizeFirstLetter(str) {
return str.charAt(0).toUpperCase() + str.slice(1);
}
capitalizeFirstLetter(string); // Returns "FreeCodecamp"