POP VALUE OFF FRONT OF ARRAY JS code example
Example 1: removing first item array js
var list = ["bar", "baz", "foo", "qux"];
list.shift()//["baz", "foo", "qux"]
Example 2: js array pop
var array = ['A', 'B', 'C'];
// removes and returns last element
lastElement = array.pop();