Check out example codes for "ruby array". It will help you in understanding the concepts better.
Code Example 1
ary = [1, "two", 3.0] #=> [1, "two", 3.0]
Code Example 2
Array.new( number of indices, value of the indices ) { optional block for value of indices }
ary = Array.new #=> []
Array.new(3) #=> [nil, nil, nil]
Array.new(3, true) #=> [true, true, true]
Array.new(3) { Hash.new } #=> [ {}, {}, {} ]
Code Example 3
my_array = []
# OR
my_array = [1, 2, 3]
# OR
my_array = Array.new
#OR
(1..10).to_a
Learn ReactJs, React Native from akashmittal.com