Created
October 13, 2017 13:24
-
-
Save fntneves/b2dfbddc00b6637a5ebe7fbfb90ad2ef to your computer and use it in GitHub Desktop.
Class example with private methods.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const privateMethod = Symbol('privateMethod'); | |
export default class Clazz { | |
constructor() { | |
// | |
} | |
doIt() { | |
// | |
} | |
[privateMethod]() { | |
// | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment