Last active
February 11, 2017 02:08
-
-
Save saoudrizwan/5a3bbd4d634659d9e8336bf4f1501114 to your computer and use it in GitHub Desktop.
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 numbers = [1, 2, 3, 4, 5] | |
var evenNumbers = [Int]() | |
for i in 0..<numbers.count { | |
let number = numbers[i] | |
if number % 2 == 0 { | |
evenNumbers.append(number) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment