What does this print?
let names: [String]? = ["Al"]
let count = names?.count
print(count ?? 0)
print(type(of: count))
Try it in the online Swift Playground →
[spoiler title="Solution"]
Answer:
1 Optional<Int>
Explanation:
Optional chaining on `names?.count` returns `Optional
[/spoiler]