Multiple deferred calls execute in last-in, first-out order. The last defer runs first:
func example() {
defer fmt.Println("first")
defer fmt.Println("second")
defer fmt.Println("third")
}
// Output: third, second, first
Think of defers as a stack. Each defer pushes onto the stack, and when the function returns, they pop off in reverse order. This order makes sense for paired operations like lock/unlock.