Range in php http://php.net/manual/en/function.range.php To create such an array, need use a slice? I only know the method using the slice and loop for, but can there be another, more efficient way?
In golang, there is only one iteration construct and that's the for loop. There are multiple ways to configure the for loop itself, but overall there is just the single construct:
https://tour.golang.org/flowcontrol/1
https://play.golang.org/p/wBSGJqHuLK
The C method -- for i := 0; i < 10; i++ { }
The python method -- for k, v := range map[string]string{"key": "val"} { }
The python method -- for idx, val := range []string{"one", "two"} { }
The empty for -- for { }