array length swift

Swift
let arr = [1, 2, 3]
print(arr.count) // 3// Initialize the Array
var a = [1,2,3]

// Get the size of the array

let size = a.count
print(size)

		
				
Source

Also in Swift: