Added missing types for range

This commit is contained in:
David Barda
2017-05-20 22:41:17 +03:00
parent f46f42351c
commit 09dbf3d744

View File

@@ -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)