var delimitedString=myArray.join(delimiter); var myList=new Array(”jpg”,”bmp”,”gif”,”ico”,”png”); var portableList=myList.join(”|”); //结果是jpg|bmp|gif|ico|png
var myString=”JavaScript”; var w=myString.indexOf(”v”);w will be 2 var x=myString.indexOf(”S”);x will be 4 var y=myString.indexOf(”Script”);y will also be 4