Remove an element from the beginning of an array JavaScript

Remove an element from the beginning of an array JavaScript-

To remove an element from the beginning of an array, you use the shift() method:-

let seas = ['Black Sea', 'Caribbean Sea', 'North Sea', 'Baltic Sea'];
const firstElement = seas.shift();
console.log(firstElement);