Last active
March 23, 2018 20:22
-
-
Save matteocargnelutti/6fef29ef5da7b064f3e9f14021d25fb2 to your computer and use it in GitHub Desktop.
JS const article #4
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
| let foo = {x: 12}; | |
| const bar = foo; | |
| console.log(bar); // { x: 12 } | |
| foo.x = 13; | |
| console.log(bar); // { x: 13 } !! bar's content has been affected by the changes made in foo ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment