87,994
社区成员




<script language="javascript">
Array.prototype.unique2 = function()
{
for(var a={}, b={}, i=0, n=this.length; i<n; i++)
{
if(typeof(b[this[i]])!="undefined") continue;
if(typeof(a[this[i]])=="undefined") a[this[i]] = 1;
else{b[this[i]]=1; delete a[this[i]]}
}
this.length=0;
for(i in a) this[this.length] = i; return this;
};
var a = new Array(1,2,3,4);
var b = new Array(2,3,5,7);
var c = a.concat(b).unique2();
alert(c);
</script>
]<script language="javascript">
Array.prototype.unique2 = function()
{
for(var a={}, i=0, n=this.length; i<n; i++)
{
if(typeof(a[this[i]])=="undefined") a[this[i]] = 1;
else{ delete a[this[i]]}
}
this.length=0;
for(i in a) this[this.length] = i; return this;
};
var a = new Array(1,2,3,4);
var b = new Array(2,3,5,7);
var c = a.concat(b).unique2();
alert(c);
</script>
<script language="javascript">
Array.prototype.unique2 = function()
{
for(var a={}, b={}, i=0, n=this.length; i<n; i++)
{
if(typeof(b[this[i]])!="undefined") continue;
if(typeof(a[this[i]])=="undefined") a[this[i]] = 1;
else{b[this[i]]=1; delete a[this[i]]}
}
this.length=0;
for(i in a) this[this.length] = i; return this;
};
var a = new Array(1,2,3,4);
var b = new Array(2,3,5,7);
var c = a.concat(b).unique2();
alert(c);
</script>