我無法理解此代碼。 請幫我無法理解此代碼
function HelloFunc(func){
this.greeting = "hello";
}
HelloFunc.prototype.call = function(func){
func? func(this.greeting) : this.func(this.greeting);
}
var userFunc = function(greeting){
console.log(greeting);
}
var objHello = new HelloFunc();
objHello.func = userFunc;
objHello.call();
func? func(this.greeting):this.fun(this.greeting);
這是什麼意思?
還,我無法理解在整個 代碼,請explane代碼
EEEck。代碼不應該試圖覆蓋/替換'fn.call()'。製作與內置名稱不衝突的自己的函數名稱。 – jfriend00
我也無法理解它。 – 2016-01-24 04:25:04