What goes in the blank?
// Go: runs only when key k is present in m
if _, found := m[k]; ____ {
hit++
}
Answer: found
The comma-ok form returns a second bool that tells a missing key apart from a stored zero value.
Play Problem Solving ▸
// Go: runs only when key k is present in m
if _, found := m[k]; ____ {
hit++
}
Answer: found