Closed sagaritrockz closed 3 weeks ago
Context: https://go.dev/tour/moretypes/10
Change the title above to describe your issue and add your feedback here, including code if necessary
Change this ` func main() { s := []int{2, 3, 5, 7, 11, 13}
s = s[1:4] fmt.Println(s) s = s[:2] fmt.Println(s) s = s[1:] fmt.Println(s)
} `
to this ` func main() { s := []int{2, 3, 5, 7, 11, 13}
s1 := s[1:4] fmt.Println(s1) s2 := s[:2] fmt.Println(s2) s3 := s[1:] fmt.Println(s3)
I think the point is also to show the progressive modification of the original slice, so it's okay to re-use the same variable.
Context: https://go.dev/tour/moretypes/10
Change the title above to describe your issue and add your feedback here, including code if necessary
Change this ` func main() { s := []int{2, 3, 5, 7, 11, 13}
} `
to this ` func main() { s := []int{2, 3, 5, 7, 11, 13}
} `