javascript get rid of first element in array code example
Example 1: Javascript get last item in array
var colors = ["red","blue","green"];
var green = colors[colors.length - 1]; //get last item in the array
Example 2: remove first element from array javascript
var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.shift();
Example 3: remove first element of array javascript
var fruits = ["Banana", "Orange", "Apple", "Mango"]
fruits.shift()
Example 4: javascript remove first item from array
type answer