标签:length rip document bre write == java 数组 for
var arr=[1,1,2,3,4,4,4,5,6,6,6,6];
var arrb=Array();
for(var i=0;i<=arr.length-1;i++)
{
var d=0;
for(var j=i+1;j<=arr.length;j++)
{
if(arr[i]==arr[j])
{
d=1;
break;
}
}
if(d==0)
{
arrb.push(arr[i]);
}
}
for(var x in arrb)
{
document.write(arrb[x]+" ")
}
标签:length rip document bre write == java 数组 for
原文地址:http://www.cnblogs.com/yi11/p/6618705.html