{"id":232724,"date":"2020-12-29T01:40:22","date_gmt":"2020-12-28T17:40:22","guid":{"rendered":"http:\/\/4563.org\/?p=232724"},"modified":"2020-12-29T01:40:22","modified_gmt":"2020-12-28T17:40:22","slug":"%e5%85%b3%e4%ba%8e-js-%e9%97%ad%e5%8c%85%e7%9a%84%e8%81%94%e6%83%b3%ef%bc%8c%e4%b8%ba%e4%bb%80%e4%b9%88%e5%8c%bf%e5%90%8d%e5%87%bd%e6%95%b0%e5%86%85%e7%9a%84%e5%8f%98%e9%87%8f%e4%b8%8d%e8%83%bd","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=232724","title":{"rendered":"\u5173\u4e8e js \u95ed\u5305\u7684\u8054\u60f3\uff0c\u4e3a\u4ec0\u4e48\u533f\u540d\u51fd\u6570\u5185\u7684\u53d8\u91cf\u4e0d\u80fd\u76f4\u63a5\u8bbf\u95ee\u5462 \u5177\u4f53\u770b\u4ee3\u7801"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5173\u4e8e js \u95ed\u5305\u7684\u8054\u60f3\uff0c\u4e3a\u4ec0\u4e48\u533f\u540d\u51fd\u6570\u5185\u7684\u53d8\u91cf\u4e0d\u80fd\u76f4\u63a5\u8bbf\u95ee\u5462 \u5177\u4f53\u770b\u4ee3\u7801               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sodadev <\/span>  <span><i><\/i> 2<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>var Counter = (function() { var privateCounter = 0; function changeBy(val) { privateCounter += val; } return { increment: function() { changeBy(1); }, decrement: function() { changeBy(-1); }, value: function() { return privateCounter; } } })();<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>45<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4736371\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : cyrbuzz <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7c98\u8d34\u5728\u63a7\u5236\u53f0\u6ca1\u5565\u62a5\u9519\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736372\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : sodadev <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5f88\u62b1\u6b49\u6211\u4e0d\u4f1a\u683c\u5f0f\u5316\u4ee3\u7801 = = \u5927\u5bb6\u5c06\u5c31\u770b\u4e00\u4e0b\u5427 \u8fd9\u4e2a\u662f MDN \u4e0a\u7684\u539f\u7248\u793a\u4f8b<br \/>var Counter = (function() { <br \/>var privateCounter = 0; <br \/>function changeBy(val) { <br \/>privateCounter += val; <br \/>}<br \/> return { <br \/>increment: function() { changeBy(1); }, <br \/>decrement: function() { changeBy(-1); }, <br \/>value: function() { return privateCounter; }<br \/> } <br \/>})();                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736373\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : des <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u8fd9\u95ee\u9898\u4e0d\u662f\u5f88\u602a\u5417\uff0c\u8bbe\u8ba1\u4e0a\u5c31\u662f\u4e0d\u80fd\u76f4\u63a5\u8bbf\u95ee\uff0c\u6240\u4ee5\u4e0d\u80fd\u76f4\u63a5\u8bbf\u95ee                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736374\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : sodadev <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @cyrbuzz \u662f\u4e0d\u62a5\u9519 \u6211\u5728\u60f3\u4e3a\u4ec0\u4e48 console.log(Counter.privateCounter); \u8fd4\u56de\u503c\u4f1a\u662f undefined                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736375\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : sodadev <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @des \u6211\u5c31\u662f\u8fd9\u4e2a\u610f\u601d\uff0c\u3002\u3002\u3002\u4e3a\u4ec0\u4e48\u8bbe\u8ba1\u6210\u4e0d\u80fd\u8bbf\u95ee\u3002\u3002\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736376\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ck65 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5148\u629b\u5f00\u95ed\u5305\u4e0d\u60f3\u3002<\/p>\n<p>Counter \u662f\u4e00\u4e2a object\uff0c\u6240\u4ee5\u4f60\u80fd .privateCounter\uff0c\u8fd9\u5728\u8bed\u6cd5\u4e0a\u4e0d\u72af\u89c4\uff0c\u6240\u4ee5\u4e0d\u62a5\u9519\u3002<\/p>\n<p>\u4f46 Counter \u91cc\u6ca1\u6709 privateCounter \u8fd9\u4e2a\u5c5e\u6027\uff0c\u6240\u4ee5\u8bfb\u5b83\u5c31\u662f undefined \u3002<\/p>\n<p>\u518d\u56de\u6765\u770b\u4e3a\u4ec0\u4e48 Counter \u91cc\u6ca1\u6709 privateCounter \u8fd9\u4e2a\u5c5e\u6027\u5462\uff1f\u56e0\u4e3a\u8fd9\u4e2a\u5bf9\u8c61\u7684\u503c\u662f\u4e2a\u533f\u540d\u51fd\u6570\uff0c\u4ec5\u4ec5\u662f\u8fd9\u4e2a\u533f\u540d\u51fd\u6570\u91cc\u6709\u4e2a\u53d8\u91cf\u53eb privateCounter \u800c\u5df2\u3002<\/p>\n<p>\u8fd9\u4e2a\u53d8\u91cf\u4e0d\u5c5e\u4e8e Counter\uff0c\u5b83\u88ab\u533f\u540d\u51fd\u6570\u5305\u5728\u4e00\u4e2a\u5c01\u95ed\u7684\u4f5c\u7528\u57df\u91cc\u4e86\u3002\u95ed\u5305\u4e8c\u5b57\u8bf4\u7684\u5c31\u662f\u8fd9\u4e2a\u4f5c\u7528\u57df\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736377\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : sodadev <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ck65 \u8c22\u8c22\u6307\u6559\uff01 \u90a3\u6211\u518d\u63d0\u95ee\u4e00\u4e0b\uff0c \u56e0\u4e3a Counter \u8fd9\u4e2a\u5bf9\u8c61\u53ea\u6709\u4e00\u4e2a\u533f\u540d\u51fd\u6570\uff0c\u4f46\u56e0\u4e3a\u662f\u533f\u540d\u7684\u51fd\u6570 \uff0c\u6240\u4ee5\u6ca1\u6cd5\u7528 &#8221; <br \/>xx.xx &#8221; \u8fd9\u79cd\u5f62\u5f0f\u8c03\u7528\u662f\u4e48                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736378\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ck65 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             1 \u3001JS \u91cc\u51fd\u6570\u672c\u8eab\u4e5f\u662f object\uff0c\u4e0d\u7ba1\u533f\u540d\u4e0d\u533f\u540d<br \/>2 \u3001\u4e0d\u662f\u6ca1\u6cd5\u7528 xx.xx \uff0c\u76f8\u53cd\u53ef\u4ee5\uff0c\u5c31\u50cf\u4f60\u5bf9\u4efb\u610f\u4e00\u4e2a object \u53bb xx.xx \u4e00\u6837<\/p>\n<p>\u611f\u89c9\u4f60\u7684\u57fa\u7840\u6982\u5ff5\u6709\u70b9\u4e0d\u719f\uff0c\u53ef\u4ee5\u9605\u8bfb\u4e00\u4e0b\u300a\u4f60\u4e0d\u77e5\u9053\u7684 JS \u300b\u51e0\u672c\u5c0f\u518c\u5b50\uff0c\u7279\u522b\u6613\u61c2\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736379\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : vision1900 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u907f\u5f00\u95ed\u5305\u4e0d\u8c08\uff0c\u8bf7\u95ee\u4f60\u80fd\u8fd9\u4e48\u641e\u5417\uff1a<br \/>var privateCounter = 0;<br \/>var Counter = {<br \/>increment: function() { changeBy(1); },<br \/>decrement: function() { changeBy(-1); },<br \/>value: function() { return privateCounter; }<br \/>}<\/p>\n<p>\/\/ \u73b0\u5728\u4f60\u60f3                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736380\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : vision1900 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \/\/ \u73b0\u5728\u4f60\u60f3\u8bbf\u95ee Counter.privateCounter? Excuse Me?                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736381\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : shintendo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u554a\u8fd9\uff0c\u867d\u7136\u51fd\u6570\u662f\u5bf9\u8c61\uff0c\u4f46\u4ece\u6765\u6ca1\u8bf4\u8fc7\u51fd\u6570\u91cc\u9762\u7684\u53d8\u91cf\u662f\u8fd9\u4e2a\u5bf9\u8c61\u7684\u5c5e\u6027\u5427\uff1f\u4f60\u4e3a\u4ec0\u4e48\u4f1a\u5f97\u51fa\u8fd9\u4e2a\u7ed3\u8bba                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736382\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : sodadev <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ck65 \u8c22\u8c22\u6307\u6559\uff01\u5df2\u7ecf\u627e\u5230\u8d44\u6e90\u4e86\uff01                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736383\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : sodadev <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @vision1900 #9 \u6309\u7167\u6211\u76ee\u524d\u7684\u7406\u89e3\u6765\u8bf4\uff0c \u5e94\u8be5\u662f\u4e0d\u53ef\u4ee5\u7684\u3002\u3002<br \/>\u6211\u7684\u7406\u89e3\u662f <br \/>privateCounter \u548c Counter \u662f\u540c\u7ea7\u7684\uff08\u540c\u4e00\u4e2a\u4f5c\u7528\u57df\uff09<br \/>\u6240\u4ee5\u4e0d\u53ef\u4ee5\u53bb\u8bfb\u53d6<br \/>\u8bf7\u95ee\u8fd9\u6837\u7684\u7406\u89e3\u5bf9\u5417                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736384\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : sodadev <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @shintendo \u8bf7\u95ee\uff01 \u90a3\u4e48\u8fd9\u6837\u8bf4\u7684\u8bdd\uff0c\u51fd\u6570\u7684\u91cc\u7684\uff08\u6307\u82b1\u62ec\u53f7\u91cc\u7684\uff09\u53d8\u91cf\u662f\u4e0d\u80fd\u88ab\u5916\u90e8\u8bbf\u95ee\u5230\u7684\u5bf9\u5417\uff0c\u4f46\u662f\uff0c\u51fd\u6570\u53ef\u4ee5\u4f7f\u7528\u5b83\u4e0a\u4e00\u7ea7\u4f5c\u7528\u57df\u7684\u53d8\u91cf\uff0c\u8fd9\u6837\u662f\u5bf9\u7684\u5417                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736385\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Kasumi20 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u627e\u4e00\u672c\u4e66\u770b\u770b\u5427&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736386\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : akira <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @shintendo \u6709\u6ca1\u90a3\u4e2a\u8bed\u8a00\u662f\u628a\u51fd\u6570\u5185\u53d8\u91cf\uff0c\u4f5c\u4e3a\u51fd\u6570\u8fd9\u4e2a\u5bf9\u8c61\u7684\u5c5e\u6027\u7684\u5462                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736387\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : johnkiller <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Counter \u53ea\u662f\u4e00\u4e2a\u5bf9\u8c61\u800c\u5df2\uff0c\u53ea\u6709\u6700\u540e return \u7684\u4e09\u4e2a\u5c5e\u6027\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736388\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ljpCN <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u4e2a\u51fd\u6570\u4e0d\u662f Counter \u7684\u5185\u5bb9\uff0c\u8fd9\u4e2a\u51fd\u6570\u7684\u8fd4\u56de\u503c\u624d\u662f Counter \u7684\u5185\u5bb9\u3002\u3002\u51fd\u6570\u88ab\u7acb\u5373\u6267\u884c\u4e86\u3002\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736389\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : oott123 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u6ca1\u6709\u5199 Counter.privateCounter = xxx\uff0c\u90a3\u4e48\u4f60\u5c31\u8bbf\u95ee\u4e0d\u4e86 Counter.privateCounter\uff0c\u5c31\u8fd9\u4e48\u7b80\u5355\u3002<br \/>\u81f3\u4e8e\u51fd\u6570\u91cc\u9762\u7684 var\uff0c\u90a3\u548c Counter \u65e0\u5173\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736390\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Zhuzhuchenyan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6df7\u6dc6\u4e86\u592a\u591a\u6982\u5ff5\uff0c\u6211\u6765\u5c1d\u8bd5\u6307\u4e00\u6761\u660e\u8def\u5427<br \/>1. \u7406\u89e3 Js \u4e2d\u5bf9\u8c61\u548c\u5c5e\u6027\u8bbf\u95ee\u5668\u7684\u6982\u5ff5\uff0c\u53c2\u8003\u9605\u8bfb<br \/>https:\/\/developer.mozilla.org\/zh-CN\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Object<br \/>https:\/\/developer.mozilla.org\/zh-CN\/docs\/Web\/JavaScript\/Reference\/Operators\/Property_Accessors<\/p>\n<p>\u6b64\u5904\u91cd\u70b9\u662f\u8981\u7406\u89e3 JS \u4e2d\u4e00\u5207\u7686\u662f\u5bf9\u8c61\uff0c\u5e76\u4e14\u5bf9\u8c61\u4e2d\u7684\u5c5e\u6027\u548c\u65b9\u6cd5\u53ef\u4ee5\u88ab\u5c5e\u6027\u8bbf\u95ee\u5668\u8bbf\u95ee\u5230<\/p>\n<p>2. \u7406\u89e3\u4ec0\u4e48\u662f\u95ed\u5305\uff0c\u53c2\u5f00\u9605\u8bfb<br \/>https:\/\/developer.mozilla.org\/zh-CN\/docs\/Web\/JavaScript\/Closures<br \/>\u6b64\u5904\u9700\u8981\u91cd\u70b9\u7406\u89e3\u8bcd\u6cd5\u4f5c\u7528\u57df\u7684\u6982\u5ff5\uff0c\u8fdb\u800c\u7406\u89e3\u95ed\u5305\u7684\u672c\u8d28\u5c31\u662f\u4f60\u6301\u6709\u7684\u7684\u67d0\u4e2a\u53ef\u4ee5\u88ab\u8c03\u7528\u7684\u51fd\u6570\u4f1a\u4fdd\u6301\u7740\u81ea\u5df1\u4f5c\u7528\u57df\u94fe\uff08\u53c8\u79f0\u8bcd\u6cd5\u73af\u5883\uff09\u7684\u5f15\u7528\u3002<\/p>\n<p>3. \u7406\u89e3 IIFE\uff0c\u53c2\u8003\u9605\u8bfb<br \/>https:\/\/developer.mozilla.org\/zh-CN\/docs\/Glossary\/\u7acb\u5373\u6267\u884c\u51fd\u6570\u8868\u8fbe\u5f0f<\/p>\n<p>4. \u7406\u89e3 var\uff0c\u53c2\u8003\u9605\u8bfb<br \/>https:\/\/developer.mozilla.org\/zh-CN\/docs\/Web\/JavaScript\/Reference\/Statements\/var<\/p>\n<p>\u6b64\u5904\u91cd\u70b9\u5176\u5b9e\u662f\u8fd9\u53e5\u8bdd\uff0c\u201c\u7528 var \u58f0\u660e\u7684\u53d8\u91cf\u7684\u4f5c\u7528\u57df\u662f\u5b83\u5f53\u524d\u7684\u6267\u884c\u4e0a\u4e0b\u6587\uff0c\u5b83\u53ef\u4ee5\u662f\u5d4c\u5957\u7684\u51fd\u6570\uff0c\u6216\u8005\u5bf9\u4e8e\u58f0\u660e\u5728\u4efb\u4f55\u51fd\u6570\u5916\u7684\u53d8\u91cf\u6765\u8bf4\u662f\u5168\u5c40\u3002\u201d<\/p>\n<p>5. \u5728 1\uff0c2\uff0c3\uff0c4 \u7684\u57fa\u7840\u4e0a\u5c31\u53ef\u4ee5\u63a8\u5bfc\u51fa\uff0cprivateCounter \u53ea\u662f\u4e00\u4e2a\u5728\u533f\u540d\u51fd\u6570\u8bcd\u6cd5\u4f5c\u7528\u57df\u4e2d\u7684\u4e00\u4e2a\u53d8\u91cf\uff0c\u5e76\u4e14\u548c\u5bf9\u8c61\u6ca1\u6709\u4efb\u4f55\u5173\u7cfb<\/p>\n<p>6. \u4f60\u53ef\u80fd\u8fd8\u4f1a\u4e00\u77e5\u534a\u89e3\uff0c\u5ef6\u4f38\u9605\u8bfb\u63a8\u8350\uff0cyou don&#8217;t know js\uff0c\u6709\u4e2d\u6587\u7248\uff0c\u5f00\u6e90\u5730\u5740\u4e3a<br \/>https:\/\/github.com\/getify\/You-Dont-Know-JS\/tree\/2nd-ed\/scope-closures<br \/>\u8fd9\u4e00\u7ae0\u5bf9\u8bcd\u6cd5\u4f5c\u7528\u57df\uff0c\u4f5c\u7528\u57df\u94fe\uff0c\u5168\u5c40\u4f5c\u7528\u57df\uff0c\u5bf9\u8c61\u751f\u547d\u5468\u671f\uff0c\u95ed\u5305\u6709\u8be6\u5b9e\u7684\u8bb2\u89e3<\/p>\n<p>7. \u5343\u4e07\u522b\u548c this \u95ee\u9898\u6df7\u6dc6\uff0c\u90a3\u662f\u53e6\u4e00\u4e2a\u5927\u5751                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736391\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : iceheart <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             14 \u7684\u7406\u89e3\u6709\u70b9\u4e0a\u8def\u4e86\uff0c\u95ee\u9898\u5173\u952e\u70b9\u662f\u4e3b\u5bf9\u4f5c\u7528\u57df\u6982\u5ff5\u7406\u89e3\u4e0d\u591f\u3002<br \/>\u591a\u6570\u60c5\u51b5\u53ef\u4ee5\u7406\u89e3\u4e3a\u82b1\u62ec\u53f7\u91cc\u8fb9\u7684\u53d8\u91cf \/\u4ee3\u7801\u4e0d\u80fd\u88ab\u5916\u90e8\u76f4\u63a5\u8bbf\u95ee\u3002\u5bf9\u8c61\u7b97\u662f\u6709\u70b9\u4f8b\u5916\u3002<br \/>\u4f5c\u7528\u57df\u57fa\u672c\u662f\u53ef\u89c1\u6027\u7684\u53e6\u4e00\u79cd\u8bf4\u6cd5\u3002\u51fd\u6570\u4f5c\u7528\u57df\u3001\u6587\u4ef6\u4f5c\u7528\u57df\u3002\u5176\u4ed6\u8bed\u8a00\u91cc\u6709\u7c7b\u4f5c\u7528\u57df\uff0c\u5bf9\u5e94 js \u91cc\u7684\u5bf9\u8c61\u4f5c\u7528\u57df\u3002\u76f8\u5173\u5185\u5bb9\u4e0d\u591a\uff0c\u5173\u952e\u8bcd:\u4f5c\u7528\u57df\uff0c\u53ef\u89c1\u6027                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736392\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : beichenhpy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0d\u592a\u61c2 js \u4f46\u6211\u611f\u89c9\u4f60\u53ef\u4ee5\u628a\u6709 privateCounter \u8fd9\u4e2a\u53d8\u91cf\u7684\u51fd\u6570\u62bd\u8c61\u51fa\u6765\uff0c\u90a3\u4e48\u8fd9\u6837\u5c31\u53ef\u4ee5\u770b\u51fa\u6765\u8fd9\u4e2a\u4ea7\u91cf\u662f\u5c40\u90e8\u7684\uff0c\u5916\u90e8\u6ca1\u6cd5\u8bbf\u95ee\u5230\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736393\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : kiwier <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5f04\u660e\u767d js \u4f5c\u7528\u57df\u4f60\u5c31\u604d\u7136\u5927\u609f\u4e86\uff0c\u51fd\u6570\u58f0\u660e\u540e\u5982\u679c\u6ca1\u6709\u6267\u884c\u662f\u65e0\u6cd5\u83b7\u77e5\u5176\u5185\u90e8\u7684\u533f\u540d\u51fd\u6570\u7684\u5185\u90e8\u7684\uff0c\u6700\u591a\u77e5\u9053\u5b58\u5728\u4e00\u4e2a\u6216\u8005\u591a\u4e2a\u533f\u540d\u51fd\u6570\uff0c\u4f46\u662f\u80af\u5b9a\u4e0d\u4f1a\u77e5\u9053\u81ea\u5df1\u5185\u90e8\u7684\u533f\u540d\u51fd\u6570\u91cc\u8fb9\u7684\u53d8\u91cf\u7684\uff0c\u5176\u5185\u90e8\u7684\u533f\u540d\u51fd\u6570\u5728\u88ab\u6267\u884c\u7684\u65f6\u5019\u4f1a\u751f\u6210\u81ea\u5df1\u7684 ao \u5bf9\u8c61\uff0c\u5916\u90e8\u51fd\u6570\u624d\u80fd\u901a\u8fc7\u533f\u540d\u51fd\u6570\u83b7\u53d6\u5230\u5185\u90e8\u53d8\u91cf                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736394\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xiangyuecn <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             var Counter = (function() {<br \/>\/\/var privateCounter = 0;<br \/>function changeBy(val) {<br \/>Counter.privateCounter = (Counter.privateCounter||0) +val;<br \/>}<br \/>return {<br \/>increment: function() { changeBy(1); },<br \/>decrement: function() { changeBy(-1); },<br \/>value: function() { return Counter.privateCounter; }<br \/>}<br \/>})();<\/p>\n<p>\u53d8\u91cf\u8c01\u8981\u5c31\u7ed9\u8c01\uff0c\u4e0d\u7136\u51fd\u6570\u91cc\u9762\u7684\u9664\u4e86\u81ea\u5df1\u80fd\u8bbf\u95ee\u8c01\u90fd\u8bbf\u95ee\u4e0d\u4e86\u3002\u7279\u4f8b\u662f\u5168\u5c40\u4e0b\u9762\u7684\uff0c\u88ab\u5212\u7ed9\u4e86 window \u5bf9\u8c61                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736395\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hujun528 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @sodadev \u65b0\u624b\u5b66\u95ed\u5305\u5374\u5b9e\u6709\u70b9\u96be\u5543\uff0c\u5efa\u8bae\u57fa\u7840\u5b66\u900f\u3000 http:\/\/www.jianxue.mobi\/treep\/2500\/2775                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736396\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dartabe <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5efa\u8bae\u628a javascript \u7684\u95ed\u5305\u4ece\u5934\u5f00\u59cb\u770b \u4e0d\u662f\u4ec0\u4e48\u4e09\u8a00\u4e24\u8bed\u8bf4\u7684\u6e05\u695a\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736397\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : kiwier <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @dartabe \u641e\u61c2\u4f5c\u7528\u57df\uff0c\u5f88\u5bb9\u6613\u7406\u89e3\u95ed\u5305                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736398\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dartabe <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @kiwier \u6211\u77e5\u9053\u662f\u4f5c\u7528\u57df\u94fe\u7684\u95ee\u9898 \u4f46\u662f\u8fd8\u662f\u770b\u4e2a\u6765\u9f99\u53bb\u8109\u6bd4\u8f83\u5bb9\u6613\u61c2                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736399\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : kiwier <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @dartabe \u662f\u7684\uff0c\u4f5c\u7528\u57df\u8fde \u539f\u578b\u94fe \u5565\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736400\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : across <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u4e2a\u5c31\u662f\u57fa\u7840\u7684\u91cd\u8981\u6027\u4e86\u3002<\/p>\n<p>\u5916\u90e8\u53d8\u91cf\u4e0d\u80fd\u8bbf\u95ee -&gt; \u53d8\u91cf\u4f5c\u7528\u57df -&gt; \u7f16\u8bd1\u5668\u7684\u5904\u7406\u65b9\u5f0f\uff08 OOP \u8bed\u8a00\u4f1a\u5c01\u88c5\u6210\u7c7b\u5bf9\u8c61\uff09 -&gt; \u5e95\u5c42\u5806\u6808\u8bbf\u95ee\u63a7\u5236\u539f\u5219\u3002<br \/>\u4f46\u662f\u8ba4\u771f\u770b\u770b js \u7684\u4e66\uff0c\u524d\u4e24\u4e2a\u4e5f\u4f1a\u660e\u786e\u544a\u8bc9\u4f60\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736401\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : px920906 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53cd\u8fc7\u6765\u60f3\uff0c\u5982\u679c\u662f\u8fd9\u6837\u8bbe\u8ba1\u7684<br \/>&#8220;`js<br \/>function sayHello(name) {<br \/> var hello = &#8216;Hello&#8217;<br \/> console.log(hello + &#8216; &#8216; + name)<br \/>}<br \/>sayHello.hello = &#8216;Fxck you&#8217;<br \/>sayHello(&#8216;Jack&#8217;)<br \/>&#8220;`<br \/>\u5c31\u5b8c\u5168\u53ef\u4ee5\u5199\u6210<br \/>&#8220;`js<br \/>var hello = &#8216;Hello&#8217;<br \/>function sayHello(name) {<br \/> console.log(hello + &#8216; &#8216; + name)<br \/>}<br \/>hello = &#8216;Fxck you&#8217;<br \/>sayHello(&#8216;Jack&#8217;)<br \/>&#8220;`<br \/>\u95ed\u5305\u3001\u5c40\u90e8\u53d8\u91cf\u4e0d\u5c31\u6ca1\u4ec0\u4e48\u610f\u4e49\u4e86\u4e48\uff0c\u90fd\u7528\u5168\u5c40\u53d8\u91cf\u597d\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736402\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : FaiChou <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             http:\/\/www.yinwang.org\/blog-cn\/2012\/08\/01\/interpreter                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736403\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : v2lf <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             var \u662f\u58f0\u660e\u5c40\u90e8\u53d8\u91cf\u7684\uff0c\u5e76\u6dfb\u52a0\u5230\u6700\u8fd1\u7684\u4f5c\u7528\u57df\u5bf9\u8c61\uff08 js\uff0c\u6211\u8bb0\u5f97\u662f\u90fd\u662f\u51fd\u6570\u4f5c\u7528\u57df\u548c\u5168\u5c40\uff09 <br \/>.\u8fd0\u7b97\u7b26\u662f\u8bbf\u95ee\u5bf9\u8c61\u5c5e\u6027\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736404\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : v2lf <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5efa\u8bae\u770b\u4e0b js \u9ad8\u7ea7\u7a0b\u5e8f\u8bbe\u8ba1\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736405\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : v2lf <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5efa\u8bae\u770b\u4e0b js \u9ad8\u7ea7\u7a0b\u5e8f\u8bbe\u8ba1\u3002<br \/>@v2lf \u770b\u4e0b\u4f5c\u7528\u57df\u94fe\uff0c\u8fd8\u6709\u539f\u578b\u94fe                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736406\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : user8341 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u4e2a\u4f8b\u5b50\u5f88\u7ecf\u5178\u7684\u3002\u5c31\u662f\u7528\u95ed\u5305\u5b9e\u73b0\u5c01\u88c5\uff0c\u8ba9\u5916\u754c\u8bbf\u95ee\u4e0d\u5230 counter \u7684\u5b9e\u73b0\u7ec6\u8282\uff0c\u53ea\u80fd\u8bbf\u95ee\u5230\u5916\u90e8\u63a5\u53e3\u3002\u5b9e\u73b0\u7ec6\u8282\u5c31\u662f privateCounter \u662f\u533f\u540d\u51fd\u6570\u7684\u5185\u90e8\u53d8\u91cf\uff0c\u5916\u90e8\u63a5\u53e3\u662f\u533f\u540d\u51fd\u6570\u7684\u8fd4\u56de\u503c\u5305\u542b\u7684\u90a3\u4e09\u4e2a\u5185\u90e8\u51fd\u6570 inc \u3001dec \u3001val \u3002<\/p>\n<p>counter \u662f\u4ec0\u4e48\uff1f\u662f\u533f\u540d\u51fd\u6570\u7684\u8fd4\u56de\u503c\uff0cCounter = (function() {&#8230;}) (); \u6ce8\u610f\u770b\uff0c\u5b83\u5b9a\u4e49\u4e86\u8fd9\u4e2a\u51fd\u6570\u5bf9\u8c61\uff0c\u7136\u540e\u7acb\u523b\u5c31\u8c03\u7528\u5b83\uff0c\u8fd4\u56de\u503c\u8d4b\u7ed9 Counter \u3002<\/p>\n<p>\u6d89\u53ca\u5230\u95ed\u5305\u7684\u6982\u5ff5\uff0c\u4e09\u4e2a\u5185\u90e8\u51fd\u6570\u4e4b\u6240\u4ee5\u80fd\u8bbf\u95ee\u5230 var privateCounter \u662f\u56e0\u4e3a\u5b83\u5c5e\u4e8e\u4ed6\u4eec\u5b9a\u4e49\u65f6\u7684\u4e0a\u4e0b\u6587\u73af\u5883\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736407\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : user8341 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5728\u4e00\u4e9b\u8bed\u8a00\u6bd4\u5982 C++\u3001Java \u8981\u5b9e\u73b0\u5c01\u88c5\u5f88\u5bb9\u6613\uff0c\u53ea\u8981\u8bbf\u95ee\u63a7\u5236\u58f0\u660e\u6210 private \u5c31\u884c\u4e86\u3002\u4f46\u662f js \u5c31\u662f\u8981\u7ed5\u4e00\u70b9\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736408\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ck65 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u786e\u5b9e\u5982 #18 @ljpCN \u6240\u8bf4\uff0cCounter \u7684\u503c\u662f\u533f\u540d\u51fd\u6570\u8fd4\u56de\u7684\u5bf9\u8c61\u3002\u6211\u9a6c\u864e\u4e86\u3002\u4f46\u7adf\u7136\u4e5f\u6b6a\u6253\u6b63\u7740\u3002\u3002\u603b\u4e4b\u6700\u7ec8\u8d4b\u7ed9 Counter \u7684\u503c\uff0c\u4e5f\u5c31\u662f return \u7684\u90a3\u4e2a\u5bf9\u8c61\u91cc\u9762\u6ca1\u6709 privateCounter \u8fd9\u4e2a key\uff0c\u8bbf\u95ee\u4e00\u4e2a\u5bf9\u8c61\u91cc\u4e0d\u5b58\u5728\u7684 key \u5c31\u5f97\u5230 undefined \u3002\u539f\u56e0\u662f\u4f5c\u7528\u57df\u5c01\u95ed\uff08 closure \uff09\u8fd9\u4e00\u601d\u8def\u8fd8\u662f\u6709\u6548\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736409\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : meepo3927 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u56e0\u4e3a\u66b4\u9732\u63a5\u53e3\u66f4\u597d\uff0c\u5bf9\u6bd4\u76f4\u63a5\u66b4\u9732\u6210\u5458\u53d8\u91cf\uff0c\u53ef\u4ee5\u5c06\u4ee3\u7801\u4fee\u6539\u5bf9\u5916\u90e8\u8c03\u7528\u7684\u5f71\u54cd\u964d\u5230\u6700\u4f4e\u3002<\/p>\n<p>\u5047\u5982\u6709\u4e00\u5929\uff0c\u56e0\u4e3a\u4e00\u4e9b\u539f\u56e0\uff0c\u4f60\u8981\u6539\u6210\u5458\u53d8\u91cf\uff08 privateCounter \uff09\u7684\u540d\u5b57\uff0c\u5982\u679c\u6ca1\u6709 value \u63a5\u53e3\u7684\u8bdd\uff0c\u5916\u90e8\u8c03\u7528\u8005\u5c82\u4e0d\u662f\u90fd\u8981\u6539\u3002<\/p>\n<p>\u6709\u4e86 value \u63a5\u53e3\uff0c\u4f60\u5c31\u968f\u4fbf\u6539\u4e86\uff0c\u751a\u81f3\u53ef\u4ee5\u5728 value \u63a5\u53e3\u4e2d\u5199\u5f88\u591a\u903b\u8f91\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736410\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : no1xsyzy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u90a3\u4e48\uff0c\u4e3a\u4e86\u5e2e\u52a9\u4e3b\u4e4b\u7c7b\u7684\u65b0\u624b\uff0c\u662f\u5426\u5b58\u5728\u53ef\u4ee5\u67e5\u770b js \u53d8\u91cf\u4f5c\u7528\u57df\u7684\uff08 IDE \u63d2\u4ef6|\u72ec\u7acb\u6f14\u793a\u7528\u5de5\u5177\uff09\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736411\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 0x11901 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8bf4\u53e5\u9898\u5916\u8bdd\uff0c\u533f\u540d\u51fd\u6570\u548c\u95ed\u5305\u672c\u8eab\u5c31\u4e0d\u662f\u540c\u4e00\u4e2a\u6982\u5ff5                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736412\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ck65 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @no1xsyzy \u8fd8\u771f\u641c\u5230\u4e00\u4e2a\u5dee\u4e0d\u591a\u9f50\u6d3b\u7684 visualizer https:\/\/ui.dev\/javascript-visualizer\/<br \/>@sodadev \u53f3\u8fb9\u4e0b\u65b9\u70b9\u51fb\u300c Complex Closures \u300d\u6709\u60ca\u559c lol                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736413\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : cczeng <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f5c\u7528\u57df\u3001\u6267\u884c\u4e0a\u4e0b\u6587                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736414\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : theohateonion <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @no1xsyzy \u4e0d\u5728\u8bcd\u6cd5\u4f5c\u7528\u57df\u7684\u53d8\u91cf\u662f\u4e2a ide \u90fd\u4f1a\u62a5\u9519\u4e86\u628a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4736415\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : no1xsyzy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @theohateonion \u662f\u76f4\u63a5\u663e\u793a\u8303\u56f4\uff0c\u800c\u4e0d\u662f\u5f97\u7b49\u6709\u9519\u624d\u4f1a\u62a5\u9519                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5173\u4e8e js \u95ed\u5305\u7684\u8054\u60f3\uff0c\u4e3a\u4ec0\u4e48\u533f\u540d&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/232724"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=232724"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/232724\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=232724"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=232724"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=232724"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}