get from array and delete code example
Example 1: how to delete an element from an array
var array = [123, "yee", true];
array.pop(index);
Example 2: find and delete element from array js
const array = [2, 5, 9];
console.log(array);
const index = array.indexOf(5);
if (index > -1) {
array.splice(index, 1);
}
// array = [2, 9]
console.log(array);