数组转字符串 var a=[1,2,3,4,5]; /数组 var b=a.join(","); console.log(b) //字符串 字符串转数组 var a="1,2,3,4,5"; var b=a.split(","); console.log(b)//数组
数组转字符串 var a=[1,2,3,4,5]; /数组 var b=a.join(","); console.log(b) //字符串 字符串转数组 var a="1,2,3,4,5"; var b=a.split(","); console.log(b)//数组
转载于:https://www.cnblogs.com/quitpoison/p/9891035.html