Skip to content

Instantly share code, notes, and snippets.

@jbmilgrom
Created August 28, 2019 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbmilgrom/685d1eff802aa1db51751b4b09047829 to your computer and use it in GitHub Desktop.
Save jbmilgrom/685d1eff802aa1db51751b4b09047829 to your computer and use it in GitHub Desktop.
Example of "sameness" in the context of mutability
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