Created
August 22, 2012 17:40
-
-
Save fastman/3427826 to your computer and use it in GitHub Desktop.
SampleClass
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 SampleClass = function () { | |
this._variable = 'test_variable'; | |
}; | |
(function () { | |
this.sampleMethod = function () { | |
console.log('Hello world'); | |
}; | |
this.getVariable = function () { | |
return this._variable; | |
}; | |
}).call(SampleClass.prototype); | |
var e = new SampleClass(); | |
e.sampleMethod(); | |
console.log(e.getVariable()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment