How to print the values from map in Go

1 Answer

0 votes
package main
  
import "fmt"
  
func main() {
    var mp = map[string]int{"go":35,"php":4, "c++":120, "python":8432}
     
    for _, value := range mp {
        fmt.Println(value)
    }
}
  
  
  
  
/*
run:
  
8432
35
4
120
  
*/

 



answered Nov 4, 2020 by avibootz

Related questions

1 answer 238 views
1 answer 156 views
1 answer 94 views
1 answer 213 views
2 answers 259 views
259 views asked Nov 4, 2020 by avibootz
2 answers 120 views
...