Array.prototype.clearRepetitionA = function(){
var result = [];
var isRepetition;
for(var i=0; i<this.length; i++){
isRepetition = false;
for(var j=0; j<result.length; j++){
if(this[i] === result[j]){
isRepetition = true;
break;
}
}
if(!isRepetition){
result.push(this[i]);
}
}
return result;
}
Array.prototype.clearRepetitionB = function(){
var result = [];
for(var i=0; i<this.length; i++){
if(result.indexOf(this[i]) == -1){
result.push(this[i]);
}
}
return result;
}
Array.prototype.clearRepetitionC = function(){
var result = [this[0]];
for(var i=1; i<this.length; i++){
if(this.indexOf(this[i]) == i){
result.push(this[i]);
}
}
return result;
}
Array.prototype.clearRepetitionD = function(){
var result = [];
var obj = {};
var key,type;
for(var i=0; i<this.length; i++){
key = this[i];
type = typeof key;
if(!obj[key]){
obj[key] = [type];
result.push(key);
}else if(obj[key].indexOf(type)){
obj[key].push(type);
result.push(key);
}
}
return result;
}
Array.prototype.clearRepetitionE = function(){
var result = [];
for(var i=0; i<this.length; i++){
for(var j=i+1; j<this.length; j++){
if(this[i] === this[j]){
j = ++i;
}
}
result.push(this[i]);
}
return result;
}
Array.prototype.clearRepetitionF = function(){
this.sort();
var result = [this[0]];
for(var i=1; i<this.length; i++){
if(this[i] !== result[result.length-1]){
result.push(this[i]);
}
}
return result;
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有