Javascript Array removeByIndex(idx)

Description

Javascript Array removeByIndex(idx)

Array.prototype.removeByIndex = function(idx) 
{
 if (idx != -1) /*from w  ww.ja  v  a2 s .c o m*/
 {
  return this.splice(idx, 1); // The second parameter is the number of elements to remove.
 }
 return false;
};



PreviousNext

Related