array remove first element javascript

JavaScript
var fruits = ["Banana", "Orange", "Apple", "Mango"];

console.log(fruits.shift()); // prints "Banana"
console.log(fruits) // prints ["Orange", "Apple", "Mango"]var fruits = ["Banana", "Orange", "Apple", "Mango"];

fruits.shift(); var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.shift();var cats = ['Bob', 'Willy', 'Mini'];
cats.pop(); // ['Bob', 'Willy']var list = ["bar", "baz", "foo", "qux"];
list.shift()//["baz", "foo", "qux"]
Source

Also in JavaScript: