Skip to main content
Journey Uncommon Logo
JourneyUncommon
easySwiftclosures and trailing closuresSingle-choice MCQ

Both calls below produce the same result. What makes the second form possible?

let nums = [1, 2, 3] let a = nums.map({ $0 * 2 }) let b = nums.map { $0 * 2 }