golang map 循环

package main

import "fmt"

func main() {
    m := map[string]int{
        "a": 1,
        "b": 2,
        "c": 3,
    }

    m2 := make(map[string]int)

    fmt.Println(m)
    fmt.Println(m2)

    for k, v := range m {
        fmt.Println(k, v)
    }
}

file

by JeffreyBool blog :point_right: link

kenuo
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

请勿发布不友善或者负能量的内容。与人为善,比聪明更重要!