← Back to archive

Stdle #25 · classes · 2026-07-01

What does this Go snippet output?

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

package main
import "fmt"
func main() {
rows := []struct {
ID int
}{{1}, {2}, {3}}
fmt.Println(len(rows), rows[2].ID)
}
Classes
4 attempts left

Answer & explanation