You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constfoo=()=>{}console.log(foo.prototype)// undefinednewfoo()// TypeError: foo is not a constructor
箭头函数中没有argument参数
constfoo=(x,y)=>{console.log(arguments)}functionbar(x,y){console.log(arguments);}foo(1,2)// Uncaught ReferenceError: arguments is not defined。注意在node中这里不会报错,但是返回的值不是我们想要的。bar(1,2)// 返回一个类数组对象,该对象保存着参数。
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: