gitlab.com/ethan.reesor/vscode-notebooks/yaegi@v0.0.0-20220417214422-5c573557938e/_test/range5.go (about) 1 package main 2 3 import "fmt" 4 5 func main() { 6 m := map[int]bool{1: true, 3: true, 5: true} 7 var n int 8 for range m { 9 n++ 10 } 11 fmt.Println(n) 12 } 13 14 // Output: 15 // 3