Created
September 24, 2015 23:07
-
-
Save dstevensio/ebefecb5f6b6d19da6aa to your computer and use it in GitHub Desktop.
Const is not immutable
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 x = 12; | |
console.log(x); // 12 | |
x = 42; | |
console.log(x); // 12 (but no error) | |
const y = {}; | |
y.newProp = "value"; | |
console.log(y); // {newProp: "value"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment