toString() var a = [1,2,3]; //定义数组 var s = a.toString(); //把数组转换为字符串 console.log(s); //返回字符串“1,2,3” join() var a = [1,2,3]; //定义数组 var s = a.join(','); //把数组转换为字符串 console.log(s); //返回字符串“1,2,3” 拼接空格 var a = [1,2,3]; //定义数组 var s = a + " "; //把数组转换为字符串 console.log(s); //返回字符串“1,2,3”