Back to cheatsheets

JavaScript

Javascript Remove Element in Array

Remove an element of arary by the give the index.

let data = ["Home", "About", "Menu"];
data.splice(2, 1);
console.log(data); // ["Home", "About"]