# splice()

*noun*

say it: **“SPLYSS”** **/splaɪs/**

A JavaScript array method that removes, replaces or inserts items at any position, changing the original array, and returns the items it removed.

## What does **splice()** do in JavaScript?

**splice()** — An Array method that removes, replaces, or inserts items by changing the original array.

```javascript
const tasks = ["Plan", "Deploy"];
tasks.splice(1, 0, "Test");
```

## In a sentence

- “playlist.**splice**(1, 1) took the second song out and closed the gap.”

Level: Apprentice · [More JavaScript terms at this level](https://www.ask-codey.com/glossary?category=javascript&level=2)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/splice
