I have hash{ "1" => "one", "2" => "two", "3" => "three" }
How to get key by value and value by key.
if I pass "1" I get "one", if I pass "two" I get "2"
def finder (string)
table = { "1" => "one", "2" => "two", "3" => "three" }
*magick*
}
return string
end
puts finder("1") => one
puts finder("one") => 1