Removing Element from an Array

Let's learn how to remove elements from an array in this lesson.

Removing element from the start

To remove an element from the start of the array, we use the shift() subroutine.

shift() deletes the element located at index 0 of the array. All numerical array keys will be modified to start counting from 0.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy