Answer the question
In order to leave comments, you need to log in
How to add an element from another array to each element of an array in Ruby?
There are two arrays
array1 = Array.[]("a", "b", "c", "d", "e")
array2 = Array.[]("1", "2", "3", "4", "5")
"//1a or //2b or //3c or //4d or //5e"
a = array2.all.map { | w| "//" + w + ....... }
a.join(" or ")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question