(function() {
var sample = "sample1";
(function() {
// set sample variable
sample = "sample2";
(function() {
// set sample variable
sample = "sample3";
}());
}());
console.log(sample); // "sample3"
}());
所以; 样本名称@variable console.log 结果“sample3”;我如何获得第一个变量?“样品1”??
console.log(sample); // --> "sample1" ??
谢谢你。