$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · medium · #304

What goes in the blank?

// Go: runs only when key k is present in m
if _, found := m[k]; ____ {
	hit++
}

Answer: found (also accepted: found, found == true)

The comma-ok form returns a second bool that tells a missing key apart from a stored zero value.
Play Problem Solving ▸