for loop on values of slice (no index)



examples/for-values/for_values.go
package main

import "fmt"

func main() {
    dwarfs := []string{"Doc", "Grumpy", "Happy", "Sleepy", "Bashful", "Sneezy", "Dopey"}
    for _, name := range dwarfs {
        fmt.Println(name)
    }
}