About Lesson
Pop Array:
The pop() method is used to remove the last element of the array and also returns the removed element. This function decreases the length of the array by 1.
Example:
var x = [“Ram”, “Arman”, “Raghav”, “Manav”];
x.pop();
Push Array:
The push() method is used to push one or more values into the array. This method changes the length of the array by the number of elements added to the array.
Example:
var x = [“Ram”, “Arman”, “Raghav”, “Manav”];
x.push();
Exercise Files
No Attachment Found
Join the conversation