Here is what I\'d like to do:
function a() { // ... } function b() { // Some magic, return a new object. } var c = b(); c instanceof b // -> true c
What's wrong with using the new keyword?
new
At any rate, it sounds like the best thing to do is read up on Javascript inheritance: http://javascript.crockford.com/inheritance.html