Last active
January 18, 2019 02:46
-
-
Save rxluz/c564b4b2e5c6d6a3318576b4c39df0cb to your computer and use it in GitHub Desktop.
The problem with Object.freeze, see more at: https://medium.com/p/1a258c160c07
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 myCustomObj = { | |
even: { | |
frozen: { | |
thisObjectWillChange: "nope 😳", | |
}, | |
}, | |
}; | |
Object.freeze(myCustomObj); | |
myCustomObj.even.frozen.thisObjectWillChange = "yeah it changed 😰"; | |
console.log(myCustomObj.even.frozen.thisObjectWillChange); //will return: yeah it changed 😰 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment