JavaScript - Delete Element from the Beginning of JS Array Last Updated : 23 Jul, 2025 Comments Improve Suggest changes Like Article Like Report These are the following ways to delete elements from JavaScript arrays:1. Using shift() method - Mostly UsedThe shift() method removes the first element from the array and adjusts its length. JavaScript const a = [1, 2, 3, 4]; // Remove the first element a.shift(); console.log(a); Output[ 2, 3, 4 ] 2. Using splice() methodThe splice() method is used to remove elements by specifying index and count. JavaScript const a = [1, 2, 3, 4]; // Remove the first element a.splice(0, 1); console.log(a); Output[ 2, 3, 4 ] 3. Using Destructuring AssignmentArray destructuring is used to extract the first element and create a new array with the rest elements. JavaScript const a1 = [1, 2, 3, 4]; // Skip the first element const [, ...a2] = a1; console.log(a2); Output[ 2, 3, 4 ] 4. Using Custom MethodThe idea is to start from the second element and shift all the elements one position to the left. After shifting all the elements, reduce the array size by 1 to remove the extra element at the end. JavaScript const a = [1, 2, 3, 4]; for (let i = 0; i < a.length - 1; i++) { a[i] = a[i + 1]; } // Adjust length to "delete" last element a.length = a.length - 1; console.log(a); Output[ 2, 3, 4 ] Comment More info A amit_singh27 Follow Improve Article Tags : JavaScript Web Technologies javascript-array Explore JavaScript BasicsIntroduction to JavaScript4 min readVariables and Datatypes in JavaScript6 min readJavaScript Operators5 min readControl Statements in JavaScript4 min readArray & StringJavaScript Arrays7 min readJavaScript Array Methods7 min readJavaScript Strings6 min readJavaScript String Methods9 min readFunction & ObjectFunctions in JavaScript5 min readJavaScript Function Expression3 min readFunction Overloading in JavaScript4 min readObjects in Javascript4 min readJavaScript Object Constructors4 min readOOPObject Oriented Programming in JavaScript3 min readClasses and Objects in JavaScript4 min readWhat Are Access Modifiers In JavaScript ?5 min readJavaScript Constructor Method7 min readAsynchronous JavaScriptAsynchronous JavaScript2 min readJavaScript Callbacks4 min readJavaScript Promise4 min readEvent Loop in JavaScript4 min readAsync and Await in JavaScript2 min readException HandlingJavascript Error and Exceptional Handling6 min readJavaScript Errors Throw and Try to Catch2 min readHow to create custom errors in JavaScript ?2 min readJavaScript TypeError - Invalid Array.prototype.sort argument1 min readDOMHTML DOM (Document Object Model)9 min readHow to select DOM Elements in JavaScript ?3 min readJavaScript Custom Events4 min readJavaScript addEventListener() with Examples9 min readAdvanced TopicsClosure in JavaScript4 min readJavaScript Hoisting6 min readJavascript Scope3 min readJavaScript Higher Order Functions7 min readDebugging in JavaScript4 min read Like