Skip to content

Instantly share code, notes, and snippets.

@kangax
Created August 26, 2010 18:48
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kangax/551953 to your computer and use it in GitHub Desktop.
Save kangax/551953 to your computer and use it in GitHub Desktop.

###Object.preventExtensions

  • Make object non-extensible (can't add properties)

###Object.seal

  • Make object non-extensible (can't add properties)
  • Make object's own properties non-configurable (can't remove them, or change their nature and/or attributes)

###Object.freeze

  • Make object non-extensible (can't add properties)
  • Make object's own properties non-configurable (can't remove them, or change their nature and/or attributes)
  • Make object's own properties non-writable (aka, read-only)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment