Javascript Array push_unique(value)

Description

Javascript Array push_unique(value)

Array.prototype.push_unique = function (value) {
  if (!this.in_array(value)) {
      this.push(value);/*from  ww  w . j  a v  a 2  s . c om*/
  }
};



PreviousNext

Related