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

Code Example 1

// Initialize the Array
var a = [1,2,3]

// Get the size of the array

let size = a.count
print(size)

Learn ReactJs, React Native from akashmittal.com