// 将字符串转换为小写
const str = "HELLO WORLD";
const lowerCaseStr = str.toLowerCase();
console.log(lowerCaseStr); // 输出: hello world
解释说明:
toLowerCase() 是 JavaScript 中的一个字符串方法,用于将字符串中的所有字符转换为小写。"HELLO WORLD" 转换为小写,结果为 "hello world"。上一篇:js 中文编码
下一篇:js 获取中文首字母
Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3
Laravel 中文站