Forked from punneng/ExampleOfPrivateMemberDeclaring.js
Created
August 3, 2012 08:29
-
-
Save wiennat/3245851 to your computer and use it in GitHub Desktop.
How to declare private properties/methods
This file contains hidden or 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
| function myPowerConstructor(x) { | |
| var that = otherMaker(x); | |
| var secret = f(x); | |
| that.priv = function () { | |
| ... secret x that ... | |
| }; | |
| return that; | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
หมายถึง private เหรอครับ