Solution to “Hash from two arrays” problem on Rosetta Code

Here’s a link: http://rosettacode.org/wiki/Hash_from_two_arrays

“Using two Arrays of equal length, create a Hash object where the elements from one array (the keys) are linked to the elements of the other (the values)”

In Ruby:

In Javascript:

Leave a Reply