Task

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)



Related task

   Associative arrays/Creation


Array extend [
  dictionaryWithValues: array [ |d|
    d := Dictionary new.
    1 to: ((self size) min: (array size)) do: [:i|
      d at: (self at: i) put: (array at: i).
    ].
    ^ d
  ]
].
 
 
({ 'red' . 'one' . 'two' } 
 dictionaryWithValues: { '#ff0000'. 1. 2 }) displayNl.