2017-06-12 59 views
0

我試圖使用及arguments.length得到命名功能的長度與困惑的arguments.length:在名爲Arrow功能

var a = function(b,c){ 
console.log(arguments.length); 
}; 
a(1,2); //2 (this is what I'm expecting) 


(function(b,c){ 
console.log(arguments.length); 
})(1,2); //it returns 2 also 


(b,c) => { 
console.log(arguments.length); 
}; 
(1,2); //2 also 

但是當我試圖使用命名箭頭功能:

let a = (b,c) => { 
console.log(arguments.length); 
}; 
a(1,2); //ReferenceError: arguments is not defined 

這:

((b,c) => { 
console.log(arguments.length); 
})(1,2); //ReferenceError: arguments is not defined 

我真的很困惑

回答