Skip to content

Instantly share code, notes, and snippets.

@jeremyckahn
Created December 7, 2014 19:19
Show Gist options
  • Select an option

  • Save jeremyckahn/59852827240957f11953 to your computer and use it in GitHub Desktop.

Select an option

Save jeremyckahn/59852827240957f11953 to your computer and use it in GitHub Desktop.
/* global global: true */
function Constructor () {
this.instanceMethod();
Constructor.staticMethod();
function privateFunction () {
global.console.log('Hello, I am an internal function! XD');
}
}
Constructor.prototype.instanceMethod = function () {
global.console.log('Hello, I am an instance method! :3');
this._privateMethod();
};
Constructor.prototype._privateMethod = function () {
global.console.log('Hello, I am a "private" function! ಠ_ಠ');
};
Constructor.staticMethod = function () {
global.console.log('Hello, I am a static function! :D');
};
var constructor = new Constructor();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment