pop element code example
Example 1: python pop
# Python list method pop() removes
# and returns last object or obj from the list.
# .pop() last element .pop(0) first element
my_list = [123, 'Add', 'Grepper', 'Answer'];
print "Pop default: ", my_list.pop()
> Pop default: Answer
# List updated to [123, 'Add', 'Grepper']
print "Pop index: ", my_list.pop(1)
> Pop index: Add
# List updated to [123, 'Grepper']
Example 2: javascript pop
var cars = ['mazda', 'honda', 'tesla'];
var telsa=cars.pop(); //cars is now just mazda,honda