Menu
I was wondering if there is a way to determine from within a function body whether it is currently being used as a function, or used to construct a new object.
function Foo() {
/* Can I figure out here if I am currently constructing a new object, or just returning a value?
}
var foo1 = new Foo();
var foo2 = Foo();