Complete the code to combine two arrays element-wise using zip.
a = [1, 2, 3] b = [4, 5, 6] combined = a.[1](b) puts combined.inspect
The zip method combines elements from two arrays into pairs.
Complete the code to print the first pair from the zipped arrays.
a = ['a', 'b', 'c'] b = [1, 2, 3] zipped = a.zip(b) puts zipped[[1]].inspect
Array indices start at 0, so the first pair is at index 0.
Fix the error in the code to correctly zip arrays and print the result.
x = [10, 20] y = [30, 40] result = x.[1](y) puts result.inspect
The correct method name is zip without exclamation or parentheses.
Fill both blanks to create a hash from two arrays using zip and to_h.
keys = [:name, :age, :city] values = ['Alice', 30, 'NYC'] hash = keys.[1](values).[2] puts hash.inspect
Use zip to pair keys and values, then to_h to convert pairs to a hash.
Fill all three blanks to zip three arrays and print the combined array.
a = [1, 2] b = ['x', 'y'] c = [:alpha, :beta] combined = a.[1](b).[2] { |pair| pair.[3](:zip, c) } puts combined.inspect
First zip a and b, then map each pair to call send(:zip) on it to combine with c.
