Skip to content

Commit

Permalink
map loop
Browse files Browse the repository at this point in the history
  • Loading branch information
0bvim committed Oct 11, 2024
1 parent c4c6d60 commit 8c12b09
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/udemy/go_ted/section12/map_loop.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package main

import "fmt"

func main() {
m := map[string]int{
"James": 42,
"Moneypenny": 32,
"Lila": 4,
"Stete": 24,
"Nivi": 18,
}

for i, v := range m {
fmt.Printf("Name %v\tAge %v\n", i, v)
}
}

0 comments on commit 8c12b09

Please sign in to comment.