Skip to main content
Journey Uncommon Logo
JourneyUncommon
easySwiftdeferSingle-choice MCQ

Does the deferred print run, and what is the final output?

func find(in arr: [Int]) -> Int? { defer { print("done") } for n in arr where n > 0 { return n } return nil } _ = find(in: [-1, 3, 5])