What is the best way to convert an array
arr = ["one", "two", "three", "four", "five"]
to the hash
{"one"=>0, "two"=>0, "three"=>0, "four"=>0, "five"=>0}
I plan to fill in the "0" with my values later, I just need the technique now.
Thank.
source
to share