Last active
June 10, 2018 06:23
-
-
Save pgpt10/c8e643a50883e33bc52aa8c1765dcdaa to your computer and use it in GitHub Desktop.
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
var arr1 = ["John", "Stefen", "Caroline"] | |
var arr2 = arr1 | |
print(arr1) //John, Stefen, Caroline | |
print(arr2) //John, Stefen, Caroline | |
arr2.removeLast() | |
arr2[0] = "Maddy" | |
print(arr1) //John, Stefen, Caroline | |
print(arr2) //Maddy, Stefen |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment