How to loop through a slice or an array in Go or Golang?
Originally Published Here ๐!
To loop through a slice or an array in Go or Golang, you can use the for keyword followed by the range operator clause.
TL;DR
package main
import "fmt"
func main(){
// slice of names
names := []string{"John Doe...
melvingeorge-me.hashnode.dev2 min read