2013-06-22 48 views

回答

5

在您的代碼toString()適用於methodB()的結果。這就像你正在做的:

var func = (o) { 
    o.methodA(); 
    o.methodB().toString(); 
    return o; 
}; 
func(new A()); 

做你想做什麼,你必須做一些事情,如:

(new A() 
    ..methodA() 
    ..methodB()).toString(); 
相關問題