Results 1 to 3 of 3
Mar 9, 2009, 07:30 #1
- Join Date
- Oct 2008
- 0 Post(s)
- 0 Thread(s)
Can somebody please give me the answer to this
Given the following two lines, create a Hash object that
maps the keys to the corresponding values and assign it to the "hash"
variable. Do all of this in one line, less than 80 characters,
without using hard-to-read variable names (ie, no single character
variable names allowed). Assume that the keys and values arrays are
already sorted so that keys should be the first key and values
should be the corresponding value, and so on.
keys = [ : one, :two, :three, :four]
values = [1, 2, 3, 4]
hash = ?