Sign in
go
/
website
/
07287109038cbabce9bbb9e132edc3434768bd45
/
.
/
_content
/
tour
/
moretypes
/
slices-pointers.go
blob: 193b463e21c0a6f3bb203b6f21141bdb13f00849 [
file
] [
log
] [
blame
]
// +build OMIT
package main
import "fmt"
func main() {
names := [4]string{
"John",
"Paul",
"George",
"Ringo",
}
fmt.Println(names)
a := names[0:2]
b := names[1:3]
fmt.Println(a, b)
b[0] = "XXX"
fmt.Println(a, b)
fmt.Println(names)
}