Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Array change value

package main

import (
	"fmt"
)

func main() {
	var res = [3]int{1, 2, 3}

	fmt.Println(res)
	res[1] = 42
	fmt.Println(res)
}
[1 2 3]
[1 42 3]