get length of array swift

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

// Get the size of the array

let size = a.count
print(size)

		
				
Source

Also in Swift: