Created
January 23, 2019 14:59
-
-
Save yannxou/4e77c5db3b12a5b89ad77a166bb08ff9 to your computer and use it in GitHub Desktop.
Iterate on array while filtering
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let array: [Any] = ["String1", 2, "String2", 3, 4] | |
| for case let str as String in array { | |
| print(str) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment