JavaScript Array pop() Method
The pop() method in JavaScript is used to remove the last element from an array and returns that element. This method changes the length of the array. Syntax Return Value Return Type Description Any The removed element from the array. Example 1: Using pop() to Remove the Last Element This code demonstrates how to use…