How to Remove Javascript from Array with Value
This is a short snippet on how to remove element from array with a value
const myArray = [1, 2, 3, 4, 5];
const index = myArray.indexOf(2);
const x = myArray.splice(index, 1);
console.log(`myArray values: ${myArray}`);
console.log(`variable x value: ${x}`);