Javascript Array borrar(element)

Description

Javascript Array borrar(element)


Array.prototype.borrar = function(element) {
  for (var i = 0; i < this.length; i++){
    if (this[i] === element){
      this.splice(i,1);//from ww  w. ja v a  2  s  . c om
    }
  }
}



PreviousNext

Related