← Back to archive

Stdle #95 · slices · 2026-09-09

What does this Go snippet output?

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

package main
import "fmt"
func main() {
s := []int{1, 2, 3, 4, 5, 6}
fmt.Println(cap(s[2:4]))
}
Slices
4 attempts left

Answer & explanation