/* js数组去掉重复项 var somearray = [1,1,2,2,3,3,4,4,'1']; somearray.check(); //somearray will return arr=[1,2,3,4,'1'] */ Array.prototype.check= function(){ var tem=[]; this.forEach(function(value){ if(tem.indexOf(value)===-1){ tem.push(value); } }); this.…