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 351 views
1 answer 252 views
1 answer 208 views
1 answer 324 views
2 answers 385 views
385 views asked Nov 4, 2020 by avibootz
2 answers 265 views
...