JavaScript Array shift() methodThe 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 provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India