Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

go Iterating over an array using a range operator

package main

import "fmt"

func main() {
    data := [...]string{"Ned", "Edd", "Jon", "Jeor", "Jorah"}
    for index, value := range data {
        fmt.Printf("Character %d of GoT is = %s
", index, value)
    }
}
 
PREVIOUS NEXT
Tagged: #Iterating #array #range #operator
ADD COMMENT
Topic
Name
7+1 =