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


<cfscript>
function makeHash(keyArray, valueArray) {
  var x = 1;
  var result = {};
  for( ; x <= ArrayLen(keyArray); x ++ ) {
    result[keyArray[x]] = valueArray[x];
  }
  return result;
}
 
keyArray = ['a', 'b', 'c'];
valueArray = [1, 2, 3];
map = makeHash(keyArray, valueArray);
</cfscript>