← Back to archive

Stdle #171 · defer · 2026-11-24

What does this Go snippet output?

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

package main
import "fmt"
func main() {
for i := 3; i > 0; i-- {
defer fmt.Print(i)
}
fmt.Print("=")
}
Defer
4 attempts left

Answer & explanation