Reputation: 43
I'm trying to combine elements from one array with every element from another array, I tried looking for some solutions but I couldn't figure it out.
Take these two arrays for example:
num = [1,2,3]
let = ["a","b","c"]
I want to combine them in order to obtain:
combined = [[1, "a"], [1, "b"], [1, "c"], [2, "a"], [2, "b"], [2, "c"],
[3, "a"], [3, "b"], [3, "c"]]
Upvotes: 2
Views: 380