remove the last element from array js code example
Example 1: javascript remove last element from array
var colors = ["red","blue","green"];
colors.pop();
Example 2: remove second last element from array javascript
var pg_url = array_fragment[array_fragment.length - 2]
Example 3: javascript remove last element from array
let numbers = [1, 2, 3];
numbers.pop();