📅  最后修改于: 2022-03-11 15:04:18.393000             🧑  作者: Mango
const mySentence = "freeCodeCamp is an awesome resource";
const finalSentence = mySentence.replace(/(^\w{1})|(\s+\w{1})/g, letter => letter.toUpperCase())
console.log(finalSentence)