Removes the last item from a list and returns that item.
This function changes the length of the list. The pop()
function works
on a list
type array, but not on a tuple
since tuples are immutable.
This function generates a change (except when called on a variable).
list.pop()
None
The removed item from the list. A lookup_err() is raised if the list is empty.
This code show an example usage of pop():
(list = [1, 2, 3]).pop(); // 3
list;
Return value in JSON format
[
1,
2
]