Skip to content

Instantly share code, notes, and snippets.

@john-nash-rs
Created May 2, 2020 12:36
Show Gist options
  • Save john-nash-rs/6b02030668c9e2bf6f35a6eb3b2478f6 to your computer and use it in GitHub Desktop.
Save john-nash-rs/6b02030668c9e2bf6f35a6eb3b2478f6 to your computer and use it in GitHub Desktop.
func main() {
students := make(map[int]string)
students[0] = "Harsh"
students[1] = "Yash"
fmt.Println(students)
delete(students, 1)
fmt.Println(students)
students[1] = "Jain"
for roll, name := range students{
fmt.Printf("Roll number of %s is %d \n",name, roll)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment