Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- x := make([]int, 2, 3)
- y := x
- x = append(x, 5)
- x[0] = 3
- x = append(x, 6)
- x[1] = 4
- fmt.Println(y)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement