Javascript Array removeObj(obj)

Description

Javascript Array removeObj(obj)



Array.prototype.removeObj = function(obj){
 var index = this.indexOf(obj);
 if (index != -1){
  this.splice(index,1);//ww w  .ja  va  2  s. com
 }
};



PreviousNext

Related