splice()
An Array method that removes, replaces, or inserts items by changing the original array.
What does splice() do in JavaScript?
splice() — An Array method that removes, replaces, or inserts items by changing the original array.
const tasks = ["Plan", "Deploy"];
tasks.splice(1, 0, "Test");
Level: Apprentice · More JavaScript terms at this level
Updated