This commit is contained in:
Unknwon
2015-02-21 03:10:05 -05:00
parent 19b7cd9899
commit 885d84ca62
4 changed files with 58 additions and 49 deletions

View File

@@ -1,4 +1,7 @@
#8.3 for循环构造方
# 8.3 for-range 的配套用
190
可以使用for循环构造map
for key, value := range map1 {
@@ -21,7 +24,7 @@
package main
import "fmt"
func main() {
map1 := make(map[int]float32)
map1[1] = 1.0