Created
March 15, 2021 01:22
-
-
Save IhwanID/afaefec94d7f42fe04241134ef6153fb to your computer and use it in GitHub Desktop.
For Where in Swift
This file contains hidden or 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, 6] | |
for number in numbers{ | |
if number.isMultiple(of: 2){ | |
print(number) | |
} | |
} | |
for number in numbers where number.isMultiple(of: 2){ | |
print(number) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment