how to print the length of array in swift code example Example: array length swift let arr = [1, 2, 3] print(arr.count) // 3