Subscript with default arguments
Swift
var counts: [Int: Int] = [:]
let numbers = [1, 2, 3, 1, 2, 1, 3]
numbers.forEach { number in
counts[number, default: 0] += 1
}
print(counts) // [1: 3, 2: 2, 3: 2]
print(counts[5, default: 0]) // 0 (non-optional)