次を返す方法でオブジェクトを構築することは可能ですか?
baseObject.foo; // return a string describing what foo does
baseObject.foo(); // execute the foo function
baseObject.bar; // bar description
baseObject.bar(); // execute bar
更新:JavaScriptメソッドのオーバーロードは近いですが、私が探しているものではありません。
Update2:jsfiddle(以下に提供されるソリューションの)。