function remove_last_child() {
var select = document.getElementById('parent_element');
select.removeChild(select.lastChild);
}
var array = [1, 2, 3, 4, 5, 6];
array.pop();
console.log(array);
//Output in console section:
//[1, 2, 3, 4, 5]
array.pop();
// Example
var colors = ['Yellow', 'Red', 'Blue', 'Green'];
var removedColor = colors.pop(); // Green
console.log(colors); // ['Yellow', 'Red', 'Blue']
let arr = [10,20,30,40,50];
arr.pop();
console.log(arr); // => [10,20,30,40]