ES6 String对象方法toUpperCase()
ES6 String对象方法toUpperCase()
该方法将字符串转换为大写形式
语法
string.toUpperCase()
返回值
返回转换后的大写形式的字符串
例子
var str = "Apples are round, and Apples are Juicy."; console.log(str.toUpperCase( ));
输出
APPLES ARE ROUND, AND APPLES ARE JUICY.
该方法将字符串转换为大写形式
string.toUpperCase()
返回转换后的大写形式的字符串
var str = "Apples are round, and Apples are Juicy."; console.log(str.toUpperCase( ));
APPLES ARE ROUND, AND APPLES ARE JUICY.