Skip to content

Instantly share code, notes, and snippets.

@ericelliott
Created January 3, 2017 21:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save ericelliott/244bdaaa548712c9e5044cf876822e29 to your computer and use it in GitHub Desktop.
Save ericelliott/244bdaaa548712c9e5044cf876822e29 to your computer and use it in GitHub Desktop.
Frozen, not immutable
const a = Object.freeze({
foo: { greeting: 'Hello' },
bar: 'world',
baz: '!'
});
a.foo.greeting = 'Goodbye';
console.log(`${ a.foo.greeting }, ${ a.bar }${a.baz}`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment