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