whta is shift method code example
Example 1: removing first item array js
var list = ["bar", "baz", "foo", "qux"];
list.shift()//["baz", "foo", "qux"]
Example 2: javascript shift
let array = ["A", "B", "C"];
//Removes the first element of the array
array.shift();
//===========================
console.log(array);
//output =>
//["B", "C"]