To get "queue" like behavior in a array, use push and shift

To get "queue" like behavior in a array, document suggest to use "pop" and "shift". But it should be "push" and "shift" as the example suggests.