var str = "hello world!";
var new_str = str.toUpperCase();
conlose.log(new_str);
HELLO WORLD!
new_str = str.toLowerCase();
hello world!
本文介绍了一种使用JavaScript实现字符串大小写转换的方法。通过将字符串转换为全大写和全小写的实例,展示了如何利用JavaScript内置方法进行字符串操作。
var str = "hello world!";
var new_str = str.toUpperCase();
conlose.log(new_str);
HELLO WORLD!
new_str = str.toLowerCase();
hello world!
转载于:https://www.cnblogs.com/liugangBlog/p/9765465.html

被折叠的 条评论
为什么被折叠?