package main import ( "fmt" ) func main() { s := []int{1, 2, 3, 4, 5} s[len(s)-1] = 999 fmt.Println(s) }