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

Code Example 1

[ 1, 2, 3, 4, 5 ].length   #=> 5
[].length                  #=> 0

". length" will get size of array

Learn ReactJs, React Native from akashmittal.com