合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
要使字符串的第一个字母大写,可以使用多种方法,例如 toUpperCase 和 slice 方法,或者使用字符数组。 ``` // To capitalize the first letter, use toUpperCase and slice methods let city = 'paris'; city = city[0].toUpperCase() + city.slice(1); console.log(city); // "Paris" ```