Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSwiftretain cycles and capture listsSingle-choice MCQ

A capture list copies a value at the point the closure is created. Given this code, what is printed?

var y = 30 let c = { [y] in print(y) } y = 40 c()