Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

Looping through an array in Go

package main
import "fmt"

func main() {
  age := [...]int{12, 4, 5}

  // loop through the array
  for i := 0; i < len(age); i++ {
    fmt.Println(age[i])
  }

}
 
PREVIOUS NEXT
Tagged: #Looping #array #Go
ADD COMMENT
Topic
Name
5+3 =