How to implement function newObject(without using new operator inside) that would act exactly like new operator? (in javascript)
To be precise I want obj = new MyClass(arg1, arg2) to be the same as obj2 = newObject(MyClass, arg1, arg2)
Any ideas, because I'm out of ideas? :)