'Convert two arrays into a dictionary in Swift [duplicate]
Let's say I have two arrays of the same length:
names = ["Adam", "Bob", "Colin"]
ages = [14, 11, 16]
How could I produce the following dictionary?
people = ["Adam": 14, "Bob": 11, "Colin": 16]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
