conventions.io

Tech Challenge

2026-09-04

🦫

Daily Tech Challenge

Go

medium
Question 1 of 5

What does this Go program print, given the three-index (full) slice expression base[1:3:3]?

Example
package main

import "fmt"

func main() {
	base := []int{1, 2, 3, 4, 5}
	s := base[1:3:3]
	fmt.Println(len(s), cap(s))

	s = append(s, 99)
	fmt.Println(base)
	fmt.Println(s)
}

Friday, September 4, 2026 · A new challenge drops every day