Newbie here. Scratching my head.
I have 2 Arrays:
arr1 = ["a", "b", "c", "d"]
arr2 = ["1", "2", "3", "4"]
I want to make a Hash using arr1
elements as the key and arr2
elements as the value. I want arr2
(or arr1
, doesn't really matter) to be random.
Result example:
hash = {"a"=>"3", "b"=>"1", "c"=>"2", "d"=>"4"}