Hash#key() is a Hash class function that returns the key value for the given value. Return nil if value does not exist. Hash.key is the syntax () Hash values are a parameter. Returns the key that corresponds to the value.