← Back to archive

Stdle #19 · slices · 2026-06-25

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{5, 6, 7}
dst := make([]int, 2)
n := copy(dst, s)
fmt.Println(n, dst)
}
Slices
4 attempts left

Answer & explanation