---
title: splice
framework: tvmljs
role: symbol
role_heading: Instance Method
path: tvmljs/playlist/1627367-splice
---

# splice

Deletes the indicated array elements and replaces them with the specified elements.

## Declaration

```data
Array splice(
    in int start, 
    in int deleteCount, 
    in Object elements
);
```

## Parameters

- `index`: The array index indicating the beginning of the splice to be deleted.
- `howMany`: The length of the splice, in number of elements.
- `elements`: An array of new elements that are replacing the deleted elements.

## Return Value

Return Value An array of the deleted elements.

## Discussion

Discussion Use this method to modify the contents of the playlist.

## See Also

### Modifying the Playlist

- [item](tvmljs/playlist/1627377-item.md)
- [length](tvmljs/playlist/1627327-length.md)
- [Playlist](tvmljs/playlist/1627336-playlist.md)
- [pop](tvmljs/playlist/1627310-pop.md)
- [push](tvmljs/playlist/1627433-push.md)
