I'm looking to basically match up two different arrays in Swift using the enumerated method. So if I have:
let array1 = ["a", "b", "c", "d"]
let array2 = ["1", "2", "3", "4"]
I need to return a new array that would read:
newArray = ["1. a1", "2. b2", "3. c3", "4. d4"]
How do I make an array like that?
array2[i]or the index? In other words, what should be the result whenarray2is["p", "q", "r", "s"],["p. ap", "q. bq", "r. cr", "s. ds"]or["1. ap", "2. bq", "3. cr", "4. ds"]?