Skip to content

Instantly share code, notes, and snippets.

@rxluz
Last active January 18, 2019 02:46
Show Gist options
  • Save rxluz/c564b4b2e5c6d6a3318576b4c39df0cb to your computer and use it in GitHub Desktop.
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
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