Created
January 30, 2016 13:35
-
-
Save gauravchl/fe8da70f46dda5817f24 to your computer and use it in GitHub Desktop.
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
var SomeClass = (function () { | |
//private vars | |
var bar = 1; | |
//constructor | |
var SomeClass = function () { | |
} | |
//public api | |
var exports = SomeClass.prototype; | |
exports.foo = function () { | |
return bar; | |
}; | |
return SomeClass; | |
}); | |
var instance = new SomeClass(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment