Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSwiftweak self in closuresSingle-choice MCQ

What does this code print, given that the timer fires once after the object has been released by its owner?

class Worker { func start() { Timer.scheduledTimer(withTimeInterval: 1, repeats: false) { [weak self] _ in guard let self else { return } self.work() } } func work() { print("tick") } }