提交 1d95731b 编写于 作者: 王炳明

Update:补充内容

上级 66e3a4d6
......@@ -164,6 +164,27 @@ hello, python
hello, go
```
如果你用一个变量来接收的话,接收到的是索引
```go
import "fmt"
func main() {
myarr := [...]string{"world", "python", "go"}
for i := range myarr {
fmt.Printf("hello, %v\n", i)
}
}
```
输出如下
```
hello, 0
hello, 1
hello, 2
```
---
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册