Editor Arrow Download Open
<html> <head> <title>JavaScript Array pop() function</title> </head> <body> <script type="text/javascript"> var city = ["Tokyo", "Mumbai", "Delhi", "Las Vegas"]; document.write("Amazing Cities: " + city.join(", ") + "<br />"); document.write(city.pop() + "<br />"); document.write(city + "<br />"); document.write(city.pop() + "<br />"); document.write(city + "<br />"); document.write(city.pop() + "<br />"); document.write(city); </script> </body> </html>
  Preview Arrow