shift js mdn

JavaScript
let array = ["A", "B", "C"];

//Removes the first element of the array
array.shift();

//===========================
console.log(array);
//output =>
//["B", "C"]const array1 = [1, 2, 3];

const firstElement = array1.shhift();

console.log(array1);
// output: Array [2, 3];
https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Array/shift
Source

Also in JavaScript: