Which array method removes the first element from an array and returns that removed element?

  • shift()
  • unshift()
  • pop()
  • push()
The array method that removes the first element from an array and returns that removed element is shift(). It shifts all other elements to a lower index, effectively removing the first element. The unshift() method adds elements to the beginning, pop() removes the last element, and push() adds elements to the end of the array.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *