Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var ClassName = function(){
- // private variables
- var d = {};
- // constructor method
- (function __construct(){
- d.string = "what";
- })();
- // public methods
- var m = {};
- m.open = function(){
- alert(d.string);
- };
- m.close = function(){
- alert(d.string);
- };
- return m;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement