Last active
November 19, 2018 11:51
-
-
Save cooler333/55477faf1a2c948cd322069cb5fa1a55 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
import Foundation | |
var array = [1, 2, 3] | |
for number in array { | |
print(number) // 1 | |
array = [4, 5, 6] | |
} | |
print(array) // 2 | |
array.forEach { (number) in | |
print(number) // 3 | |
array = [7, 8, 9] | |
} | |
print(array) // 4 | |
/* | |
Question: what will be printed? | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
проверить