how to pop everything in array code example
Example: js array pop
var array = ['A', 'B', 'C'];
// removes and returns last element
lastElement = array.pop();
var array = ['A', 'B', 'C'];
// removes and returns last element
lastElement = array.pop();