const f=(function(){
let count=0;
return function(){
return “i have been called ${++count} times.";
}})();
f(); // i have been called 1 times.
f(); //i have been called 2 times.
我的理解每次f()的时候,都会先让count清0啊,哪里理解错了,求指教。
慕前端6174657
橋本奈奈未
cnyballk
随时随地看视频慕课网APP
相关分类