Skip to content

Instantly share code, notes, and snippets.

@rwaldron
Created September 24, 2012 14:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save rwaldron/3776178 to your computer and use it in GitHub Desktop.
at-names for real private data in ES6
function C() {
this.foo = "a foo";
this.@bar = "a private at-name!";
}
var c = new C();
console.log(c);
/*
{ foo: "a foo" }
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment