单项选择题
(function(foo){ console.log(foo.bar)})({ foo: { bar: 1 } });结果为? ()
A.箭头函数没有自己的this对象B.不可以当作构造函数,也就是说,不可以对箭头函数使用new命令,否则会抛出一个错误C.不可以使用arguments对象,该对象在函数体内不存在。如果要用,可以用rest 参数代替D.以上都不对
单项选择题 let x1 = 1;function f1(y1 = x1) { let x1 = 2; console.log(y1);}f1()以上代码运行结果是 ()
单项选择题 function f(y =x){let x =2;console.log(y);}f()以上代码运行结果是()
单项选择题 var Person = { age: 18, sayHello: ()=>{ console.log(this.age); }};var age = 20;Person.sayHello();上面代码的结果是()