ruby remove first element of array code example Example: ruby pop array a = [1, 2, 3, 4] a.pop() # => 4