Notes

Range

结合 for 循环用于遍历切片或映射

var pow = []int{1, 2, 3, 4, 5}

func main() {
    for index, value := range pow {
        // do something with index, value
    }
    
    for _, value := range pow {
        // do something with value
    }
}