Javascript Array remove(str)

Description

Javascript Array remove(str)


Array.prototype.remove = function (str) {
 if (this.indexOf(str) !== -1) {
  this.splice(this.indexOf(str), 1);/* w ww  . java 2s . c  o  m*/
 };
 return this;
};



PreviousNext

Related