Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
arrayObj.splice(start, deleteCount, [item1[, item2[, . . . [,itemN]]]])
The splice method modifies arrayObj by removing the specified number of elements from position start and inserting new elements. The deleted elements are returned as a new array object.
Applies To: Array Object