I'm trying to separate my JavaScript into nice libraries. I have 2 companies under the net top-level-domain (net.foxbomb and net.matogen)
var net = {
foxbomb : {
'MyObject' : function() {
console.log ("FoxBomb")
}
}
}
var net = {
matogen : {
'MyObject' : function() {
console.log ("Matogen");
}
}
}
var f = new net.foxbomb.MyObject();
var m = new net.matogen.MyObject();
Of course, I've just defined two nets - which doesn't work. What is the correct way to do this?