Skip to content

Instantly share code, notes, and snippets.

@jhusain
Created November 21, 2015 12:21
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 jhusain/0390fa6574b53a1eee39 to your computer and use it in GitHub Desktop.
Save jhusain/0390fa6574b53a1eee39 to your computer and use it in GitHub Desktop.
var spec = { enumerable: false }
var x = {};
Object.defineProperty(x, "test", spec);
x.test = "what"
alert(JSON.stringify(x));
var y = {};
Object.defineProperty(y, "test", spec);
y.test = "what";
y.other = "prop";
alert(JSON.stringify(y));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment