SOURCE

var func = function(){
  var a = 1
  return function() {
    a++
    console.log(a)
  }
}
var f = func() // f是func1的运行结果
f()
f()
f()
console 命令行工具 X clear

                    
>
console