字符串数组、数字数组相互转换
var arrNumber = [1, 2, 3, 4, 5, 6, 7, 8, 9];
arrNumber.map(String); //结果: ['1', '2', '3', '4', '5', '6', '7', '8', '9']
var arrString = ['1', '2', '3', '4', '5', '6', '7', '8', '9']
arrString.map(Number); //结果:[1, 2, 3, 4, 5, 6, 7, 8, 9]
js字母大小写转换方法
// 转换成大写 toUpperCase()
const str = 'Ab';
console.log(str.toUpperCase()) // AB
// 转换成小写 toLowerCase()
const str = 'Ab';
console.log(str.toLowerCase()) // ab