Created
November 4, 2020 13:56
-
-
Save brunodelgado/b1786d7e340bc54f6d1d3744d43b218c to your computer and use it in GitHub Desktop.
loop-filter-01
This file contains 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 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