JS—字符串的toLowerCase( )

81 阅读1分钟

1.概述

toLowerCase( )将字符串转化为小写形式,返回一个新字符串,不改变原字符串

2.语法

str.toLowerCase( )

1)参数

toLowerCase( )无参数

2)返回值

返回一个新字符串,不改变原字符串

3.案例使用

const str= "HELLO,HOW ARE YOU";
console.log(str.toLowerCase())   //hello,how are you