数组去重

Array.prototype.unique=function(){

  var result=[];

  this.forEach(function(v){

    if(result.indexOf(v)<0){

      result.push(v);

    });

)

posted @ 2019-03-11 10:14  sweeeper  阅读(105)  评论(0编辑  收藏  举报