假如有数组["测试1","测试2","测试3"]如何转化为'测试1','测试2','测试3'
1 回答

慕尼黑的夜晚无繁华
TA贡献1864条经验 获得超6个赞
arr.join(",")
还是要保留引号
let arr = ["测试1","测试2","测试3"]let str = JSON.stringify(arr)str = str.substring(1, str.length - 1)
添加回答
举报
0/150
提交
取消