Skip to content

Instantly share code, notes, and snippets.

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