JavaScript Array shift() methodLast Updated : 17 Mar 2025 The JavaScript array shift() method removes the first element of the given array and returns that element. This method changes the length of the original array. SyntaxThe shift() method is represented by the following syntax: ReturnThe first element of an array. JavaScript Array shift() method exampleLet's see an example to remove and return the first element of an array. ExampleTest it NowOutput: AngularJS Next TopicJavaScript Array |
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India