标签:
var a = (function(){ var c= 0; return function(){ return ++c; } }()); var g = a(); console.log(g); var e= a(); console.log(e); var f = a(); console.log(f);
闭包小demo
原文地址:http://www.cnblogs.com/xupeiyu/p/4640760.html