Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let rndStrings = ["a", "b", "c"]
- var rndInts = [Int]()
- rndStrings.forEach { rndString in
- someAsyncMethod { intResult in
- rndInts.append(intResult)
- }
- }
- // i want to wait until rndInts has all 3 values
Add Comment
Please, Sign In to add comment