← Back to archive

Stdle #114 · maps · 2026-09-28

What does this Go snippet output?

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

package main
import "fmt"
func main() {
m := map[string][]int{}
m["a"] = append(m["a"], 7)
fmt.Println(m["a"])
}
Maps
4 attempts left

Answer & explanation