Swift
defer ordering
What's the output order when you call this function?
func run() {
defer { print("A") }
do {
defer { print("B") }
print("C")
}
defer { print("D") }
print("E")
}Pick one
defer ordering
What's the output order when you call this function?
func run() {
defer { print("A") }
do {
defer { print("B") }
print("C")
}
defer { print("D") }
print("E")
}Pick one