Check out example codes for "ruby pop array". It will help you in understanding the concepts better.

Code Example 1

a = [1, 2, 3, 4]
a.pop()
# => 4

Learn ReactJs, React Native from akashmittal.com