Created
June 12, 2015 22:32
-
-
Save gvidon/ecd30db789f64e86b8dd to your computer and use it in GitHub Desktop.
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
var | |
privateMethod = Symbol('privateMethod'); | |
function DoNotExposePrivateMethod() { return this; } | |
DoNotExposePrivateMethod.prototype[privateMethod] = function() { console.log('Private phrase!'); } | |
DoNotExposePrivateMethod.prototype.publicMethod = function() { console.log('Public phrase! ' + this[privateMethod]()); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment