Skip to content

Instantly share code, notes, and snippets.

@ACbosong

ACbosong/.js Secret

Created August 10, 2021 10:34
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 ACbosong/b6ed9c5d3fdf2ee2cea755abad06a553 to your computer and use it in GitHub Desktop.
Save ACbosong/b6ed9c5d3fdf2ee2cea755abad06a553 to your computer and use it in GitHub Desktop.
v1 = "global"
var v2 = "var"
Object.getOwnPropertyDescriptor(globalThis, "v1")
// Object { value: "global", writable: true, enumerable: true, configurable: true }
Object.getOwnPropertyDescriptor(globalThis, "v2")
// Object { value: "var", writable: true, enumerable: true, configurable: false }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment