Skip to content

Instantly share code, notes, and snippets.

@yannxou
Created January 23, 2019 14:59
Show Gist options
  • Select an option

  • Save yannxou/4e77c5db3b12a5b89ad77a166bb08ff9 to your computer and use it in GitHub Desktop.

Select an option

Save yannxou/4e77c5db3b12a5b89ad77a166bb08ff9 to your computer and use it in GitHub Desktop.
Iterate on array while filtering
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