Javascript Array del(n)

Description

Javascript Array del(n)


Array.prototype.del=function(n) {
 if(n<0){//from w  w w. j a v  a 2  s  .  c  o m
  return this;
 }else{
  return this.slice(0,n).concat(this.slice(n+1,this.length));
 }
}



PreviousNext

Related