remove elemtn from array in javascript code example
Example 1: remove first element from array javascript
var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.shift();
Example 2: take off element form end of array
const colors = ["Blue", "Green", "Red", "Yellow"];
colors.pop();
console.log(colors); // ["Blue", "Green", "Red"]