pop(table)

Remove the last value from a table and return it.

Example
t={}
push(t,1)
push(t,2)
value = pop(t)