📅  最后修改于: 2022-03-11 15:01:48.157000             🧑  作者: Mango
function capitalizeFirstLetter(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
console.log(capitalizeFirstLetter('foo')); // Foo