← Back to archive

Stdle #105 · iteration · 2026-09-19

What does this Go snippet output?

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

package main
import "fmt"
func main() {
s := "hi"
switch len(s) {
case 1:
fmt.Println("short")
case 2:
fmt.Println("medium")
fallthrough
case 3:
fmt.Println("longish")
}
}
Iteration
2 lines
4 attempts left

Answer & explanation