Map element exists



examples/exists/exists.go
package main

import "fmt"

func main() {
    grades := make(map[string]int)

    grades["Mary"] = 99
    grades["Joe"] = 0

    value, ok := grades["Mary"]
    fmt.Println(ok)
    fmt.Println(value)
    fmt.Println()

    value, ok = grades["Joe"]
    fmt.Println(ok)
    fmt.Println(value)
    fmt.Println()

    value, ok = grades["Jane"]
    fmt.Println(ok)
    fmt.Println(value)
}

examples/exists/exists.out
true
99

true
0

false
0