JavaScript push and pop

JavaScript push and pop


JavaScript Array push() and pop() 
In this Tutorial, we will learn about JavaScript Array push() and pop() methods is as follows:
Array push() and pop() methods work as stack LIFO(Last In First Out) Operation.
The Syntax of push() is as follows:
Array.push()
Example1- Insert an element in Array Fruits with the help of push method:
Output
Example2- Insert two elements in Array Fruits with the help of push method:
Output
The Syntax of push() is as follows:
Array.pop()
Example1- Delete an element in Array Fruits with the help of pop() method:
Output