问答题669/1530以下代码的输出是什么?

1var name = 'window' 2const obj = { 3 name: 'obj', 4 sayName:function() { 5 console.log(this.name) 6 }, 7} 8obj.sayMyName = () => { 9 console.log(this.name) 10} 11const fn1 = obj.sayName 12const fn2 = obj.sayMyName 13fn1() 14obj.sayName() 15fn2() 16obj.sayMyName()
难度:
2022-04-10 创建

赞赏支持

预览

题库维护不易,您的支持就是我们最大的动力!