# 1. 泄漏一:全局变量使用
function foo (){
barA = 'a'; // 上升为全全局变量 === window.barA
this.barB = 'b';
return barA + barB;
}
## 2\. 定时器存在
var
← instanceOf 闭包 →
function foo (){
barA = 'a'; // 上升为全全局变量 === window.barA
this.barB = 'b';
return barA + barB;
}
## 2\. 定时器存在
var
← instanceOf 闭包 →