/*将数组转化为字符串*/
// 用法 数组名.join(符号)
var txt = ["aa","bb","cc"];
console.log(txt.join("-")); //结果为 aa-bb-cc 的字符串 而不是数组
console.log(txt.join("*")); //aa*bb*cc字符串
console.log(txt); //数组仍为"aa","bb","cc",数组本身并不会改变
/*将字符串转化为数组*/
var txt1 = "aa,bb,cc";
console.log(txt1.split(",")); //split(符号) 符号必须与字符串中的符号保持一致 结果为 "aa","bb","cc"
console.log(txt1.split("*")); //不一致的话 结果为 "aa,bb,cc"