Skip to content

Instantly share code, notes, and snippets.

@jasonwilliams
Last active July 31, 2018 11:44
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 jasonwilliams/c3e1d4dd166c774ead19d14811bfbbeb to your computer and use it in GitHub Desktop.
Save jasonwilliams/c3e1d4dd166c774ead19d14811bfbbeb to your computer and use it in GitHub Desktop.
class Jason {
    x = 0;
    #y = 'private!';

    foo() {
        console.log(this.x);
        console.log(this.#y);
    }
}

jason = new Jason();
jason.foo();
> Executing task: babel-node /Users/willij87/workspace/testing/testing-js/index.js <

0
{ writable: true, value: 'private!' }

Terminal will be reused by tasks, press any key to close it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment