Created
October 20, 2019 18:26
-
-
Save parvezmrobin/84bb04f653dbd19d8ae13d88df32bcf4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
func main() { | |
var marks = map[string]int{} | |
marks["sakeef"] = 95 | |
marks["oishie"] = 82 | |
marks["robin"] = 61 | |
marks["mim"] = 43 | |
delete(marks, "sakeef") | |
var v int | |
var ok bool | |
v, ok = marks["sakeef"] | |
println("sakeef", v, ok) // sakeef 0 false | |
v, ok = marks["oishie"] | |
println("oishie", v, ok) // oishie 82 true | |
v, ok = marks["robin"] | |
println("robin", v, ok) // robin 61 true | |
v, ok = marks["mim"] | |
println("mim", v, ok) // mim 43 true | |
v, ok = marks["antu"] | |
println("antu", v, ok) // antu 0 false | |
v, ok = marks["alice"] | |
println("alice", v, ok) // alice 0 false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment