[JavaScript] Remove an array element at a given index

Created on November 30, 2026

Use splice with the starting index and the number of elements to remove. Indexing starts at zero, so splice(1, 1) removes two and modifies arr in place.

let arr = ["one", "two", "three"];
arr.splice(1, 1);
console.log(arr);

Output

[ 'one', 'three' ]
JavaScript Node.js