We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cecb934 commit 3b431bcCopy full SHA for 3b431bc
1 file changed
src/udemy/go_ted/section13/underying_array.go
@@ -0,0 +1,13 @@
1
+package main
2
+
3
+import "fmt"
4
5
+func main() {
6
+ a := []int{1, 2, 3, 4, 5, 6}
7
+ b := make([]int, len(a))
8
+ copy(b, a)
9
+ b[0] = 7
10
+ fmt.Printf("b: %v\n", b)
11
+ fmt.Printf("a: %v\n", a)
12
13
+}
0 commit comments