转成字符串
toString() 返回一个新的字符串;
a = new Array(0,1,2,3,4); b = a.join(“”);//”01234” 不修改原数组
转成数组
var s = “abc,abcd,aaa”; ss = s.split(“,”);//[“abc”, “abcd”, “aaa”] 不修改原字符串
toString() 返回一个新的字符串;
a = new Array(0,1,2,3,4); b = a.join(“”);//”01234” 不修改原数组
var s = “abc,abcd,aaa”; ss = s.split(“,”);//[“abc”, “abcd”, “aaa”] 不修改原字符串