Last active
December 20, 2018 17:05
-
-
Save h3nr1ke/145e9fde011901aabca21db1862d7dc9 to your computer and use it in GitHub Desktop.
const example ECMA 6
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 OBJ = { | |
prop1 : "foo", | |
prop2 : "bar", | |
prop3 : 100 | |
} | |
console.log(OBJ); | |
// chaging the value of a constant "variable" =) | |
// no errors displayed | |
OBJ.prop1 = "another value"; | |
OBJ.prop2 = "example text"; | |
OBJ.prop3 = 453; | |
console.log(OBJ); | |
// but if you try to change the structure it self | |
// ERROR... | |
OBJ = {newProp : "qwerty"}; | |
// END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment