Javascript Array remove(n)

Description

Javascript Array remove(n)


// http://www.codewars.com/kata/remove-method-in-arrays

Array.prototype.remove = function(n) {
  if (n === +n && n > 0)
    this.splice(n, 1);//from   w ww . ja  v  a 2  s.  c om
}



PreviousNext

Related