Skip to content

Instantly share code, notes, and snippets.

@brunodelgado
Created November 4, 2020 13:58
Show Gist options
  • Save brunodelgado/a3e2833e9bfc9580b42902869d8b3885 to your computer and use it in GitHub Desktop.
Save brunodelgado/a3e2833e9bfc9580b42902869d8b3885 to your computer and use it in GitHub Desktop.
loop-filter-02
let items = [1, 2, 3, 4, 5, 6]
var subitems: [Int] = []
for item in items where item > 3 {
subitems.append(item)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment