// 字符数组转数字数组
let strArr = ["2", "3", "1", "1"]
let numArr = strArr.map(Number)
console.log(numArr)
// number数组转为string数组
let numArr1 = [2, 3, 1, 1]
let strArr1 = strArr.map(String)
console.log(strArr1)
原文:https://www.cnblogs.com/bgnb/p/14660126.html