var a = [ "David", "Cynthia", "Raymond", "Clayton", "Mike", "Jennifer" ]; var a1 = a.join(); alert(a1); // David,Cynthia,Raymond,Clayton,Mike,Jennifer alert(typeof a1)//string a2 = a.toString(); alert(a2); // David,Cynthia,Raymond,Clayton,Mike,Jennifer alert(typeof a2);//string
时间: 2024-10-24 20:21:01