← Back to archive

Stdle #75 · defer · 2026-08-20

What does this Go snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

package main
import "fmt"
func main() {
defer fmt.Println("one")
fmt.Println("two")
defer fmt.Println("three")
fmt.Println("four")
}
Defer
4 lines
4 attempts left

Answer & explanation