Last active
August 29, 2015 14:02
-
-
Save endorama/69086f0388826dd06b1f to your computer and use it in GitHub Desktop.
Namespace JavaScript class prototype pattern
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
// define application namespace ( this is window ) | |
this.Namespace = this.Namespace || {}; | |
(function() { | |
"use strict"; | |
function Foobar() {}; | |
var p = Foobar.prototype; // = new Object(); // to extend Foobar | |
Namespace.Foobar = Foobar; | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment