求问JS高手,我想通过遍历一个数组然后做replace,把把数组里的单数位置的...答:12=>21 --- var arr= [1,2,3,4,5,6,7,8,9];var newArr=new Array();var len=arr.length;if(!len%2==0){ newArr[len-1]=arr[len-1];len=len-1;} for(i=0;i<len;i++){ newArr[i+1]=arr[i];newArr[i]=arr[i+1];i++;} var str="";for(i=0;i<newArr...