← Back to archive

Stdle #26 · iteration · 2026-07-02

What does this Go snippet output?

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

package main
import "fmt"
func main() {
n := 0
switch n {
case 0:
fmt.Println("zero")
fallthrough
default:
fmt.Println("other")
}
}
Iteration
2 lines
4 attempts left

Answer & explanation