Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

splice Method

Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. Returns the elements removed from the array.

function splice(start : Number, deleteCount : Number [, item1 : Object [, ... [, itemN : Object]]]]) : Array

start

Required. The zero-based location in the array from which to start removing elements.

deleteCount

Required. The number of elements to remove.

item1, ... , itemN

Optional. Elements to insert into the array in place of the deleted elements.

The splice method modifies the array by removing the specified number of elements from position start and inserting new elements. The deleted elements are returned as a new array object.

Community Additions

ADD
Show:
© 2015 Microsoft