Added missing types for range
This commit is contained in:
@@ -105,7 +105,7 @@ There are two important operations in loops which are `break` and `continue`. `b
|
||||
// break prints 10、9、8、7、6
|
||||
// continue prints 10、9、8、7、6、4、3、2、1
|
||||
```
|
||||
`for` can read data from `slice` and `map` when it is used together with `range`.
|
||||
`for` can read data from `array`, `slice`, `map` and `string` when it is used together with `range`.
|
||||
```Go
|
||||
for k,v:=range map {
|
||||
fmt.Println("map's key:",k)
|
||||
|
||||
Reference in New Issue
Block a user