Javatpoint Logo
Javatpoint Logo

JavaScript Array pop() method

The JavaScript array pop() method removes the last element from the given array and return that element. This method changes the length of the original array.


The pop() method is represented by the following syntax:


The last element of given array.

JavaScript Array pop() method example

Let's see some examples of pop() method.

Example 1

Here, we will pop an element from the given array.

Test it Now


Orginal array: AngularJS,Node.js,JQuery
Extracted element: JQuery
Remaining elements: AngulaJS,Node.js

Example 2

In this example, we will pop all the elements from the given array.

Test it Now


Extracted element: JQuery
Extracted element: Node.js
Extracted element: AngulaJS

Next TopicJavaScript Array

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA