top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

How does pop()method work in JavaScript?

+4 votes
39 views
How does pop()method work in JavaScript?
posted Jun 15, 2015 by Muskan

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

+3 votes
 
Best answer

Definition and Usage:

The pop() method removes the last element of an array, and returns that element.

Note: This method changes the length of an array.

Tip: To remove the first element of an array, use the shift() method.

Syntax

array.pop()
answer Jun 15, 2015 by Vrije Mani Upadhyay
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...