判断题
正确(↓↓↓ 点击‘点击查看答案’看答案解析 ↓↓↓)
(function(foo){ console.log(foo.bar)})({ foo: { bar: 1 ...
单项选择题(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.l...
单项选择题let x1 = 1;function f1(y1 = x1) { let x1 = 2; console.log(y1);}f1()以上代码运行结果是 ()
A.1B.2C.报错D.undefined
function f(y =x){let x =2;console.log(y);}f()以上代码运行结果是(...
单项选择题function f(y =x){let x =2;console.log(y);}f()以上代码运行结果是()
A.报错B.1C.2D.undefined