Go Basics: For loop suprise!
What happens when we run this code?
func main() {
data := []string{"Hello", "World"}
toPrint := []*string{}
for _, a := range data {
toPrint = append(toPrint, &a)
}
for _, p := range toPrint {
fmt.Println(*p)
...
jimmiebtlr.com2 min read