- Mastering macOS Programming
- Stuart Grimshaw
- 45字
- 2021-07-02 22:54:39
Comparing arrays
Arrays, being value types, are compared according to their contents:
let arrA = [1, 2, 3]
let arrB = [1, 2, 3]
let arrC = [3, 4, 5]
arrA == arrB
arrA != arrC
Both these comparisons return true, as one would expect.