We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c12b09 commit bac3d60Copy full SHA for bac3d60
1 file changed
src/udemy/go_ted/section12/map_loop.go
@@ -14,4 +14,24 @@ func main() {
14
for i, v := range m {
15
fmt.Printf("Name %v\tAge %v\n", i, v)
16
}
17
+
18
+ fmt.Println()
19
20
+ if age, ok := m["James"]; ok {
21
+ fmt.Println("The age is", age)
22
+ } else {
23
+ fmt.Println("Not match")
24
+ }
25
26
+ if age, ok := m["O"]; ok {
27
28
29
30
31
32
+ if age, ok := m["n"]; !ok {
33
34
35
36
37
0 commit comments