Javascript namespace notation

var namespace = new function() {
var privatestring = “abc”;
this.publicstring = “def”;
var privatefn = function () {};
this.publicfn = function() {};
};

Typically will have a public function called ‘init’ so that can call namespace.init();