Skip to content

Instantly share code, notes, and snippets.

@AkashRajvanshi
Created November 2, 2019 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AkashRajvanshi/8b305388f152227bd71864b8a6a2f1c5 to your computer and use it in GitHub Desktop.
Save AkashRajvanshi/8b305388f152227bd71864b8a6a2f1c5 to your computer and use it in GitHub Desktop.
Object.defineProperty(user, 'canBeDeleted', {
value: 123,
configurable: true
});
Object.defineProperty(user, 'cannotBeDeleted', {
value: 456,
configurable: false
});
console.log(delete user.cannotBeDeleted) // false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment