JS 将数字字符串转为 数字数组
摘要:
将字符串转化为数组主要代码: let str = '3,4,5,6' let arr = str.split(",").map(Number); console.log(arr) //结果:[3,4,5,6] 将数字数组转化为字符串数组 let arrs = [1, 2, 3, 4, 5, 6, 7 阅读全文
posted @ 2020-08-18 11:51 婧星 阅读(7891) 评论(0) 推荐(1) 编辑