• 2022-06-01 问题

    varmyObject={foo:"bar",func:function(){varself=this;console.log(this.foo);console.log(self.foo);(function(){console.log(this.foo);console.log(self.foo);}());}};myObject.func();程序的输出是什么? A: barbarbarbar B: barbarbarundefined C: barbarundefinedbar D: undefinedbarundefinedbar

    varmyObject={foo:"bar",func:function(){varself=this;console.log(this.foo);console.log(self.foo);(function(){console.log(this.foo);console.log(self.foo);}());}};myObject.func();程序的输出是什么? A: barbarbarbar B: barbarbarundefined C: barbarundefinedbar D: undefinedbarundefinedbar

  • 1