Check out example codes for "how to push into an array with ruby". It will help you in understanding the concepts better.

Code Example 1

#ruby syntax

some_array_name = ["information 1", "information 2"]
some_array_name.push("information 3")

#output will be => 
["information 1", "information 2", "information 3"]

Learn ReactJs, React Native from akashmittal.com