The easiest way is using shift(). If you have an array, the shift function shifts everything to the left.

var arr = [1, 2, 3, 4]; 
var theRemovedElement = arr.shift(); // theRemovedElement == 1
console.log(arr); // [2, 3, 4]
Answer from Thalsan on Stack Overflow
🌐
W3Schools
w3schools.com › jsref › jsref_shift.asp
JavaScript Array shift() Method
❮ Previous JavaScript Array Reference Next ❯ · Shift (remove) the first element of the array: const fruits = ["Banana", "Orange", "Apple", "Mango"]; fruits.shift(); Try it Yourself » · The shift() method returns the shifted element: const ...
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Array › shift
Array.prototype.shift() - JavaScript | MDN
The shift() method is a mutating method. It changes the length and the content of this. In case you want the value of this to be the same, but return a new array with the first element removed, you can use arr.slice(1) instead.
🌐
CoreUI
coreui.io › answers › how-to-remove-the-first-item-from-an-array-in-javascript
How to remove the first item from an array in JavaScript · CoreUI
September 18, 2025 - From my expertise, the most efficient and built-in solution is using the shift() method, which removes and returns the first element. This approach is clean, performant, and specifically designed for this exact use case.
🌐
Medium
medium.com › @erictongs › the-best-way-to-remove-the-first-element-of-an-array-in-javascript-shift-vs-splice-694378a7b416
The best way to remove the first element of an array in Javascript — shift() vs splice() | by Eric Tong | Medium
March 29, 2019 - In Javascript, there are two methods in Array.prototype for removing the first element of an array: shift() and splice(). shift() doesn’t take any arguments. It returns the first element of the array and removes the element from the array.
🌐
Bobby Hadz
bobbyhadz.com › blog › javascript-remove-first-element-from-array
Remove first or first N elements from Array in JavaScript | bobbyhadz
Use the `Array.shift()` method to remove the first element from an array, e.g. `const firstElement = arr.shift();`.
Find elsewhere
🌐
Vultr Docs
docs.vultr.com › javascript › standard-library › Array › shift
JavaScript Array shift() - Remove First Element | Vultr Docs
November 25, 2024 - Validate the changes to the array. ... let fruits = ['apple', 'banana', 'cherry']; let removedElement = fruits.shift(); console.log(removedElement); // Outputs: apple console.log(fruits); // Outputs: ['banana', 'cherry'] Explain Code · This code demonstrates removing the first element from the fruits array.
🌐
freeCodeCamp
freecodecamp.org › news › how-to-remove-an-element-from-a-javascript-array-removing-a-specific-item-in-js
How to Remove an Element from a JavaScript Array – Removing a Specific Item in JS
August 31, 2022 - I suggest this article that covers how to destructure an array if you want to go deeper on this topic. You can remove the first element using destructuring – let's say of an array named arr – and create a new array named newArr in this way: ...
🌐
Delft Stack
delftstack.com › home › howto › javascript › javascript remove first element from array
How to Remove First Element From an Array in JavaScript | Delft Stack
February 2, 2024 - If you don’t have any issues if the original array gets altered, go with the splice() and the shift methods. But if you don’t want to change the original array, go with the filter() and the slice methods.
🌐
w3tutorials
w3tutorials.net › blog › remove-first-element-from-array-and-return-the-array-minus-the-first-element
How to Remove the First Element from an Array and Return the Modified Array in JavaScript — w3tutorials.net
Before diving into solutions, let’s ... ("mutated"), or should we return a new array while leaving the original intact? ... The shift() method is JavaScript’s built-in way to remove the first element from an array....
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › delete-the-first-element-of-array-without-using-shift-method-in-javascript
Delete the first element of array without using shift() method in JavaScript - GeeksforGeeks
August 5, 2025 - We can use the filter() method to filter out the element at index 0. Example: In this example, we will implement the above approach. ... let Arr = ['Geeks', 'GFG', 'Geek', 'GeeksForGeeks']; console.log("Array: [" + Arr + "]"); function ...
🌐
RSWP Themes
rswpthemes.com › home › javascript tutorial › how to remove the first element from an array in javascript
How to Remove the First Element from an Array in JavaScript
January 10, 2024 - Explore efficient methods to remove the first element from an array in JavaScript with our comprehensive guide. Learn through clear examples and in-depth explanations to master the art of array manipulation. Discover the power of Array.shift(), Array.slice(), and Array.splice(). How to Remove the First Element from an Array in JavaScript - your key to JavaScript array mastery!
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Array › splice
Array.prototype.splice() - JavaScript | MDN
If deleteCount is omitted, or if its value is greater than or equal to the number of elements after the position specified by start, then all the elements from start to the end of the array will be deleted. However, if you wish to pass any itemN parameter, you should pass Infinity as deleteCount to delete all elements after start, because an explicit undefined gets converted to 0. If deleteCount is 0 or negative, no elements are removed.
🌐
w3tutorials
w3tutorials.net › blog › to-remove-first-and-last-element-in-array
How to Remove First and Last Elements from a JavaScript Array: Easy Step-by-Step Tutorial — w3tutorials.net
Empty Arrays: Returns undefined and leaves the array empty. To remove the first element without modifying the original array, use slice(1).
🌐
Sololearn
sololearn.com › en › Discuss › 496498 › remove-the-first-element-of-an-array
Remove the first element of an array | Sololearn: Learn to code for FREE!
Quick view: var empArr=[]; var maxArr = 50; var s; for(var i=0; i<maxArr; i++) { empArr.push(Math.round(Math.random() * 50)); document.write("Element " + i + ": " + empArr[i] + "<br>"); } document.write("<br>"); arr(); function arr(){ if(empArr.length>=50){ empArr.shift(); } for(var i=0; i<empArr.length; i++) { document.write("NEW Element " + i + ": " + empArr[i] + "<br>"); } }
🌐
Suraj Sharma
surajsharma.net › blog › javascript-array-remove-first-element
How to remove the first element of an array in JavaScript | Suraj Sharma
Learn to use Array.shift() method and array destructuring to remove the first element of an array in JavaScript
🌐
JSchallenger
jschallenger.com › javascript-practice › javascript-arrays › remove-first-elements-array-javascript
Remove first n elements of an array | JSchallenger
JSchallenger. Write a function that takes an array (a) as argument. Remove the first 3 elements of 'a'. Return the result