链家前端选择题求解答
链家前端选择题求解答
var a = 0;
function A() {
this.a = 1;
setTimeout(function() {
this.a = 2;
try{
this.a = 'b';
throw '';
}catch(e) {
this.b = 'bb';
}
},0)
this.b = 'bbb';
}
var aa = new A();
setTimeout(function() {
console.log(aa.a);
console.log(window.a);
console.log(aa.b);
console.log(window.b);
},0);

