Skip to content

Instantly share code, notes, and snippets.

@ardcore
Created August 25, 2009 08:50

Revisions

  1. ardcore created this gist Aug 25, 2009.
    12 changes: 12 additions & 0 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    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";
    }
    })();