Last active
September 30, 2019 02:25
-
-
Save andregardi/92f8d790ee0dc08186df35e9b9d46f2f 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
| const people = [{ name: "mary", age: 20 }, { name: "john", age: 30 }]; | |
| const john = people[1]; | |
| const jonhClone = { name: "john", age: 30 }; | |
| console.log(john === people[1]) // true | |
| console.log(john === jonhClone) // false | |
| people[1].age = 31; | |
| console.log(john) // { name: "john", age: 31 } | |
| console.log(jonhClone) // { name: "john", age: 30 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment