我的最终目标是能够做到这样的事情:
MyVar(parameter).functionToPerform();
很傻,即使在阅读了如何声明变量之后,查看jQuery代码,......我仍然无法理解它.
这是我到目前为止尝试过的,但它失败了:
var MyClass = function(context) {
this.print = function(){
    console.log("Printing");
}
this.move = function(){
    console.log(context);
}
};
var test = new MyClass();
test.print(); // Works
console.log('Moving: ' + test('azerty').move() ); // Type property error