What is the best way to build constructors in JavaScript using object literal notation?
var myObject = { funca : function() { //... }, funcb : function() {
var myObject = function(arg){ return{ constructor: function(arg){ //... return this; }, funca: function(){ //... }, funcb: function(){ //... } }.constructor(arg); }; //... var myVar = new myObject("...");