Javascript Array removeObjectAtIndex(index)

Description

Javascript Array removeObjectAtIndex(index)


/**//  ww w .  j  a  v  a2 s  . com
* Returns a new array that have the same elements but for the element specified by index.
*/
Array.prototype.removeObjectAtIndex = function (index){
  var array = this.splice(index);
  array.shift();
  return this.concat(array);
}



PreviousNext

Related