Created
August 28, 2019 21:44
-
-
Save jbmilgrom/685d1eff802aa1db51751b4b09047829 to your computer and use it in GitHub Desktop.
Example of "sameness" in the context of mutability
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
const p1 = [1, 2]; | |
const p2 = [1, 2]; | |
const p3 = [1, 3]; | |
p2[1] = 3; | |
// Which of p1, p2 and p3 are "the same"? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment