结果:
/** * * @param {*} str 字符串 * @returns */ const fistLetterUpper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1); }; console.log(fistLetterUpper('abc'))