And I can\'t seem to understand this kind of variable declaration:
_, prs := m[\"example\"]
What exactly is \"_,\" doing and w
_ is the blank identifier. Meaning the value it should be assigned is discarded.
Here it is the value of example key that is discarded. The second line of code would discard the presence boolean and store the value in prs.
So to only check the presence in the map, you can discard the value. This can be used to use a map as a set.