0

From this initialize array:

x = []
y = [1,2,3,4,5]
z = ["a", "b", "c", "d", "e"]

I want x result to be like this:

=> [[1,"a"], [2,"b"], [3,"c"], [4,"d"], [5,"e"]]

Is there any short method to do this without using nested loop?

Sebastián Palma
  • 32,692
  • 6
  • 40
  • 59
oj5th
  • 1,379
  • 10
  • 25

0 Answers0