I'm trying to create a function within a namespace that will get me a new object instance.
I get syntax error trying to do the following:
var namespace = {
a : function(param){
this.something = param;
},
a.prototype.hi = function(){
alert('hi');
},
b : function(){
var t = new a('something');
}
};
What is the correct syntax for doing this? Is it not possible to do within the namespace object? I don't want to declare the namespace first. Thanks