ProgrammerGuide.Net | Step by Step Programmer Guide

Removing an Item from Javascript Array | JavaScript Array pop() Method Example | JavaScript Tutorial


The pop() method removes the last element of an array, and returns that element. pop() method also changes the length of an array after removing the last element.

var fruits = [“Banana”“Orange”“Apple”“Mango”];
fruits.pop();
The result of fruits will be:
Banana,Orange,Apple
Please click here for related products on Amazon!

Jayashee

Add comment

Want to Check Celebrities News?