Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ardcore
Created August 25, 2009 08:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ardcore/174547 to your computer and use it in GitHub Desktop.
Save ardcore/174547 to your computer and use it in GitHub Desktop.
var MyClass;
(function() {
MyClass = function() {
this.val = 2;
}
MyClass.prototype.publicFunction = function() {
return privateFunction.call(this);
}
privateFunction = function() {
return this.val + " is the value of val";
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment