1var arr = [1, 2, 3, 4];
2var theRemovedElement = arr.shift(); // theRemovedElement == 1
3console.log(arr); // [2, 3, 4]
1var colors = ["red", "green", "blue"];
2var red=colors.shift();
3//colors is now ["green","blue"];
1var fruits = ["Banana", "Orange", "Apple", "Mango"];
2fruits.shift();
3// var fruits = ["Orange", "Apple", "Mango"];