Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSwiftassociated typesSingle-choice MCQ

An existential `any Sequence` is used here. What does the code print?

let s: any Sequence = [1, 2, 3] var total = 0 for x in s { total += x as! Int } print(total)