function test1() {
function test2() {
var b = 2;
console.log(a); // 1
}
var a = 1;
return test2;
}
var c = 3;
var test3 = test1();
test3()
test1 定义 :test1.scope->0:GO
test1 执行:test1.scope->0:test1.AO
1:GO
test2定义:test2.scope->0:test1.AO
1:GO
test1结束:test1.scope->0:GO
test1函数先结束,return了,函数肯定执行完成,test1.AO的地址删除,只有GO的地址
test3(test2) 执行:test2.scope->0:test2.AO
1:test1.AO
2:GO
test3结束:test2.scope->0:test1.AO
1:GO