Javascript Array diff(array)

Description

Javascript Array diff(array)


Array.prototype.diff = function(array){
  return this.filter(function(i) {
    if(array){/*from  www  .  jav  a 2s  .  c  om*/
      return !(array.indexOf(i) > -1)
    }
  })
}



PreviousNext

Related