{"id":386098,"date":"2021-03-11T13:20:46","date_gmt":"2021-03-11T05:20:46","guid":{"rendered":"http:\/\/4563.org\/?p=386098"},"modified":"2021-03-11T13:20:46","modified_gmt":"2021-03-11T05:20:46","slug":"javascript-%e7%9a%84%e9%97%ad%e5%8c%85%e7%89%b9%e6%80%a7%e6%98%af%e5%90%a6%e6%9d%a5%e6%ba%90%e4%ba%8e%e6%9f%90%e7%a7%8d%e8%ae%be%e8%ae%a1%e5%a4%b1%e8%af%af%ef%bc%9f%e6%88%96%e6%98%af%e6%9f%90%e7%a7%8d","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=386098","title":{"rendered":"Javascript \u7684\u95ed\u5305\u7279\u6027\u662f\u5426\u6765\u6e90\u4e8e\u67d0\u79cd\u8bbe\u8ba1\u5931\u8bef\uff1f\u6216\u662f\u67d0\u79cd\u8bbe\u8ba1\u9886\u5148\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  Javascript \u7684\u95ed\u5305\u7279\u6027\u662f\u5426\u6765\u6e90\u4e8e\u67d0\u79cd\u8bbe\u8ba1\u5931\u8bef\uff1f\u6216\u662f\u67d0\u79cd\u8bbe\u8ba1\u9886\u5148\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : LeeReamond <\/span>  <span><i><\/i> 3<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u5982\u9898\uff0c\u6700\u8fd1\u542c\u524d\u7aef\u540c\u4e8b\u8ba8\u8bba js \u7684\u95ed\u5305\u6709\u611f\uff0c\u8fd9\u4e2a\u5e16\u5b50\u60f3\u8ba8\u8bba\u4e00\u4e0b\u8bed\u8a00\u7684\u547d\u540d\u7a7a\u95f4\u8bbe\u8ba1\uff0c\u5e76\u975e\u5355\u7eaf\u5c40\u9650\u5728\u95ed\u5305\u95ee\u9898\u3002\u6807\u9898\u91cc\u5199\u95ed\u5305\u662f\u56e0\u4e3a\u611f\u89c9\u8fd9\u6837\u6bd4\u8f83\u5bb9\u6613\u88ab\u5927\u5bb6\u7406\u89e3\u3002<\/p>\n<p>\u4ee5\u4e0b\u6b63\u6587<\/p>\n<p>=============<\/p>\n<p>\u6211\u4e2a\u4eba\u5b66\u4e60 js \u7684\u8fc7\u7a0b\u4e2d\u6ca1\u600e\u4e48\u5728\u610f\u8fc7\u95ed\u5305\u8fd9\u4e2a\u7279\u6027\uff0c\u6211\u611f\u89c9\u547d\u540d\u7a7a\u95f4\u9010\u7ea7\u7ee7\u627f\u662f\u4e00\u4e2a\u518d\u81ea\u7136\u4e0d\u8fc7\u7684\u8bbe\u8ba1\uff0c\u5176\u4ed6\u8bed\u8a00\u4e2d\u4e0d\u90fd\u662f\u5982\u6b64\u8bbe\u8ba1\u7684\uff1f\u4f46\u662f\u65c1\u542c\u522b\u4eba\u8ba8\u8bba\u540e\u53d1\u73b0 js \u7684\u547d\u540d\u7a7a\u95f4\u786e\u5b9e\u8ddf\u5176\u4ed6\u8bed\u8a00\u4e0d\u592a\u4e00\u6837\uff0c\u4ece\u8bbe\u8ba1\u539f\u56e0\u4e0a\uff0c\u4f3c\u4e4e js \u7684\u4f5c\u8005\u5e0c\u671b\u8bbe\u8ba1\u51fa\u4e00\u79cd\u7279\u6027\u80fd\u4fdd\u5b58\u51fd\u6570\u6267\u884c\u8fc7\u7a0b\u4e2d\u7684\u6808\u72b6\u6001\uff0c\u4e0d\u8fc7\u6211\u4e2a\u4eba\u611f\u89c9\u4e0a\u95ed\u5305\u8fd9\u79cd\u4f7f\u7528\u65b9\u6cd5\u53c8\u6ca1\u6709\u5176\u4ed6\u8bed\u8a00\u4e2d\u751f\u6210\u5668\u4e4b\u7c7b\u7684\u7279\u6027\u63cf\u8ff0\u80fd\u529b\u5f3a\u3002<\/p>\n<p>\u4ece\u4f7f\u7528\u89d2\u5ea6\u6765\u8bf4\uff0cjs \u4e2d\u547d\u540d\u7a7a\u95f4\u7684\u4e00\u4e2a\u7279\u6027\u662f\u5b50\u7a7a\u95f4\u53ef\u4ee5\u4fee\u6539\u7236\u7a7a\u95f4\u5185\u5bb9\uff0c\u6bd4\u5982<\/p>\n<pre><code>var data = 0 var func = function(){     data = 1 } func() console.log(data) <\/code><\/pre>\n<p>\u5728\u8fd9\u6bb5\u4ee3\u7801\u4e2d\u5f88\u663e\u7136 data \u5c5e\u4e8e\u201c\u5168\u5c40\u53d8\u91cf\u201d\u800c\u88ab\u5355\u4e2a\u51fd\u6570\u7684\u8c03\u7528\u8fc7\u7a0b\u6240\u4fee\u6539\u4e86\u3002\u4ee5\u524d\u5728\u5199 js \u7684\u65f6\u5019\u6ca1\u6ce8\u610f\uff0c\u611f\u89c9\u81ea\u7136\u4e5f\u6ca1\u4ec0\u4e48\u5947\u602a\u4e4b\u5904\u3002\u4f46\u662f\u4ed4\u7ec6\u60f3\u60f3\uff0c\u5e73\u65f6\u5199\u5176\u4ed6\u8bed\u8a00\u65f6\u5e76\u4e0d\u662f\u8fd9\u4e48\u5904\u7406\u7684\u3002\u6bd4\u5982 C \u8bed\u8a00\u4e2d\u8981\u8fbe\u5230\u7c7b\u4f3c\u6548\u679c\u901a\u5e38\u662f\u901a\u8fc7\u4f20\u5165\u6307\u9488\u7684\u65b9\u5f0f<\/p>\n<pre><code>#include&lt;stdio.h&gt;  void main(){     int data = 0;     void func(int *p){         *p = 1;     }     func(&amp;data)     printf() } <\/code><\/pre>\n<p>\u7c7b\u4f3c\u8fd9\u6837\uff0c\u5373\u51fd\u6570\u663e\u7136\u53ef\u4ee5\u8bbf\u95ee\u540c\u7ea7\u6216\u4e0a\u7ea7\u4f5c\u7528\u57df\u4e2d\u7684\u53d8\u91cf\uff0c\u4f46\u901a\u8fc7\u4e00\u4e2a\u51fd\u6570\u76f4\u63a5\u4fee\u6539\u5168\u5c40\u53d8\u91cf\u7684\u6307\u5411\u662f\u4e0d\u88ab\u5141\u8bb8\u7684\u3002<\/p>\n<p>\u5728 python \u5f53\u4e2d\u53ef\u80fd\u7528\u4e00\u4e9b\u53d8\u901a\u7684\u7ed3\u6784<\/p>\n<pre><code>data = [0] def func(data):  data[0] = 1 <\/code><\/pre>\n<p>\u6216\u8005\u4f7f\u7528 global \u5c06\u5168\u5c40\u53d8\u91cf\u66b4\u9732\u5728\u51fd\u6570\u4e2d<\/p>\n<pre><code>data = 0 def func(data):  global  data = 2 <\/code><\/pre>\n<p>\u4e0d\u8fc7\u8bf4\u5b9e\u8bdd\u8fd9\u79cd\u63cf\u8ff0\u65b9\u5f0f\u611f\u89c9\u6bd4\u8f83\u5c40\u9650\uff0c\u867d\u7136\u7406\u8bba\u4e0a\u4f7f\u7528\u8d77\u6765\u4e0e js \u76f8\u5f53\uff0c\u4f46\u6211\u5728\u5b9e\u9645\u7a0b\u5e8f\u4e2d\u51e0\u4e4e\u6ca1\u6709\u4f7f\u7528\u8fc7 global \u6216\u8005 nonlocal \u4e4b\u7c7b\u7684\u7279\u6027\u3002<\/p>\n<p>java \u5f53\u4e2d\u53c8\u56de\u5230\u7c7b\u4f3c js \u7684\u6a21\u5f0f\uff0c\u53d8\u91cf\u503c\u53ef\u4ee5\u76f4\u63a5\u88ab\u4fee\u6539\u4e86\u3002<\/p>\n<p>============<\/p>\n<p>\u4e0d\u7981\u8ba9\u4eba\u6253\u8d77\u4e00\u4e2a\u5927\u5927\u7684\u95ee\u53f7\uff0c\u5373\u4e3a\u4ec0\u4e48\u8fd9\u79cd\u8bbe\u8ba1\u5e76\u4e0d\u7edf\u4e00\uff0c\u6709\u7684\u8bed\u8a00\u4ec5\u53ef\u4ee5\u8bfb\u53d6\uff0c\u6709\u7684\u8bed\u8a00\u53ef\u4ee5\u76f4\u63a5\u4fee\u6539\u3002\u4ed6\u4eec\u90fd\u662f\u51fa\u4e8e\u4ec0\u4e48\u76ee\u7684\u8bbe\u8ba1\u8fd9\u79cd\u7279\u6027\u7684\uff1f<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>53<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5385515\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liprais <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             21 \u5929\u641e\u51fa\u6765\u7684\uff0c\u8981\u5565\u81ea\u884c\u8f66                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385516\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : LeeReamond <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @liprais \u6211\u4e2a\u4eba\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u4e24\u79cd\u6a21\u5f0f\u90fd\u6ca1\u7ed9\u6211\u5e26\u6765\u8fc7\u4efb\u4f55\u4e0d\u723d\u3002\u4f46\u6211\u5176\u5b9e\u5f88\u60f3\u77e5\u9053\u5982\u679c\u4ee5\u540e\u8fd8\u8981\u8bbe\u8ba1\u66f4\u65b0\u7684\u8bed\u8a00\uff0c\u90a3\u79cd\u6a21\u5f0f\u662f\u66f4\u5408\u7406\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385517\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wzb0909 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u601d\u800c\u4e0d\u5b66\u5219\u6020\u554a\u3002<\/p>\n<p>\u591a\u770b\u591a\u505a\uff0c\u591a\u601d\u8003\u5b9e\u9645\u95ee\u9898\u3002\u7136\u540e\uff0c\u4f60\u5c31\u4e0d\u4f1a\u95ee\u8fd9\u6837\u7684\u95ee\u9898\u4e86\u3002<\/p>\n<p>\u597d\u7684\u95ee\u9898\u8ba9\u4eba\u8fdb\u6b65\uff0c\u574f\u7684\u95ee\u9898\u8ba9\u4eba\u539f\u5730\u8f6c\u5708\u3002<\/p>\n<p>\u662f\u7684\uff0c\u56de\u7b54\u4f60\u7684\u95ee\u9898\u53ef\u4ee5\u8ba9\u4f60\u8fdb\u6b65\uff0c\u4f46\u662f\u8fd9\u8fdb\u6b65\u53cd\u800c\u53c8\u52a9\u957f\u4e86\u4f60\u7cdf\u7cd5\u7684\u4e60\u60ef\u3002<\/p>\n<p>\u6211\u518d\u8bf4\u4e00\u904d\u6765\u603b\u7ed3\uff1a\u4f60\u7684\u95ee\u9898\u6beb\u65e0\u610f\u4e49\u3002\u4e0d\u503c\u5f97\u88ab\u601d\u8003\uff0c\u4e0d\u503c\u5f97\u88ab\u56de\u7b54\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385518\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : tushankaka <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Lisp                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385519\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mxT52CRuqR6o5 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u9996\u5148\u5f97\u6709\u5185\u5b58\u7ba1\u7406\u624d\u53ef\u80fd\u6709\u95ed\u5305                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385520\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : LeeReamond <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @wzb0909 \u8c22\u8c22\uff0cblock \u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385521\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : msg7086 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Lisp \u3002<\/p>\n<p>\u8bdd\u8bf4\u9996\u5148\u4f60 C \u8bed\u8a00\u7684\u4f8b\u5b50\u5c31\u9519\u4e86\uff0cdata \u4e0d\u662f\u5168\u5c40\u53d8\u91cf\uff0cC \u8bed\u8a00\u91cc\u4e5f\u6ca1\u6709 nested function \u3002<br \/>\u4f60\u4f8b\u5b50\u91cc func \u662f\u548c main \u5e73\u7ea7\u7684\uff0cfunc \u5f53\u7136\u4e0d\u80fd\u8bbf\u95ee main()\u91cc\u7684\u5c40\u90e8\u53d8\u91cf\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385522\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : seki <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u90fd\u662f ES6+ \u65f6\u4ee3\u4e86\uff0c\u6b63\u7ecf\u524d\u7aef\u5199\u65b0\u7684 JS \u4ee3\u7801\u4e5f\u4e0d\u4f1a\u4e0a\u6765\u4e00\u4e2a var\uff0c\u5168\u5c40\u53d8\u91cf\u6f2b\u5929\u98de\u4e86\u3002\u8fd9\u548c\u4f60\u8bf4\u7684 C \u8bed\u8a00\u7684\u300c\u901a\u5e38\u300d\u662f\u4e00\u4e2a\u9053\u7406                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385523\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : agagega <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u8bf4\u7684\u8fd9\u4e2a\u95ed\u5305\u53ef\u4ee5\u8bbf\u95ee\u5916\u90e8\u5bf9\u8c61\u7684\u7279\u6027\u5e76\u4e0d\u5947\u8469\uff0c\u53ea\u4e0d\u8fc7\u4e0d\u5141\u8bb8\u5b83\u8bbf\u95ee\u5b9e\u73b0\u8d77\u6765\u53ef\u80fd\u7b80\u5355\u4e00\u4e9b\u3002C++\u7684 lambda \u91cc\u81ea\u5df1\u53ef\u4ee5\u8bbe\u5b9a\u662f\u5426\u6355\u83b7\u548c\u600e\u4e48\u6355\u83b7\uff08\u503c\u8fd8\u662f\u5f15\u7528\uff09\uff0c\u4e0d\u8fc7\u56e0\u4e3a\u6ca1\u6709 GC\uff0c\u751f\u547d\u5468\u671f\u9700\u8981\u81ea\u5df1\u7ef4\u62a4\u3002\u5982\u679c\u4f60\u719f\u6089 Java \u8fd9\u79cd\u8bed\u8a00\u7684\u8bdd\uff0c\u4e0d\u59a8\u628a JS \u7684\u95ed\u5305\u7b49\u4ef7\u7406\u89e3\u6210\u4e00\u4e2a\u5e26 call \u65b9\u6cd5\u7684\u7c7b\u7684\u5bf9\u8c61\uff0c\u5176\u6355\u83b7\u7684\u5916\u90e8\u5185\u5bb9\u5c31\u662f\u9664\u4e86 call \u65b9\u6cd5\u5916\u8fd9\u4e2a\u7c7b\u5176\u4ed6\u7684\u6210\u5458\u53d8\u91cf\u3002JS \u771f\u6b63\u5947\u7279\u7684\u8bbe\u8ba1\u5728 this \u7684\u4f5c\u7528\u57df\uff0c\u4e0d\u662f\u8bcd\u6cd5\u4f5c\u7528\u57df\u800c\u662f\u52a8\u6001\u4f5c\u7528\u57df\uff0c\u914d\u5408\u539f\u578b\u94fe\u9020\u5c31\u4e86\u4e00\u7cfb\u5217\u5751\uff08\u548c\u9ed1\u9b54\u6cd5\uff09\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385524\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Mithril <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u8981\u7406\u89e3\u4e00\u4e2a\u4e8b\uff0c\u7a0b\u5e8f\u7684\u672c\u8d28\u662f\u6570\u636e\u4ee5\u53ca\u9488\u5bf9\u6570\u636e\u7684\u64cd\u4f5c\u3002<br \/>\u6700\u539f\u59cb\u7684\u8ba1\u7b97\u673a\u662f\u4e0d\u533a\u5206\u8fd9\u4e8c\u8005\u7684\uff0c\u901a\u8fc7\u4e00\u4e2a\u5bc4\u5b58\u5668\u6307\u5411\u67d0\u4e2a\u5185\u5b58\uff0c\u8bfb\u51fa\u7684\u4e8c\u8fdb\u5236\u90fd\u5f53\u201c\u64cd\u4f5c\u201d\uff0c\u8fd9\u4e2a\u64cd\u4f5c\u6240\u5f15\u7528\u7684\u5730\u65b9\u53ef\u80fd\u4f1a\u88ab\u8bfb\u51fa\u6765\u5f53\u4f5c\u6570\u636e\u3002<br \/>\u7136\u540e C \u90a3\u4e2a\u65f6\u4ee3\u7684\u7f16\u7a0b\u5c06\u5bf9\u6570\u636e\u7684\u64cd\u4f5c\u62bd\u8c61\u6210\u4e86\u51fd\u6570\uff0c\u8fd9\u65f6\u5019\u6570\u636e\u5c31\u6709\u4e86\u4f5c\u7528\u57df\u4e4b\u5206\u3002<br \/>\u518d\u7136\u540e\u62bd\u8c61\u5c42\u6b21\u66f4\u9ad8\u4e00\u4e9b\u7684\u8bed\u8a00\uff0c\u5c31\u4f1a\u60f3\u529e\u6cd5\u8003\u8651\u5982\u4f55\u5c06\u6570\u636e\u548c\u64cd\u4f5c\u66f4\u597d\u7684\u7ed3\u5408\u5728\u4e00\u8d77\u3002\u6240\u6709\u9762\u5411\u5bf9\u8c61\u7684\u8bed\u8a00\u8bbe\u8ba1\u4e86\u201c\u7c7b\u201d\u8fd9\u4e2a\u6982\u5ff5\u3002\u672c\u8d28\u4e0a\u5c31\u662f\u7ed9\u201c\u6570\u636e\u201d\u52a0\u4e0a\u201c\u64cd\u4f5c\u201d\u3002<br \/>\u53e6\u5916\u4e00\u4e9b\u8bed\u8a00\uff0c\u6216\u8005\u8bed\u8a00\u7684\u7279\u6027\u4f1a\u5c1d\u8bd5\u7740\u53cd\u8fc7\u6765\u505a\u3002\u7ed9\u201c\u64cd\u4f5c\u201d\u7ed1\u5b9a\u67d0\u4e9b\u201c\u6570\u636e\u201d\u3002\u6bd4\u5982 JS \u7684\u95ed\u5305\u6982\u5ff5\uff0c\u548c C++\u7b49\u8bed\u8a00\u7684 lambda \u51fd\u6570\u3002<br \/>\u4e24\u79cd\u65b9\u6cd5\u53ea\u662f\u8bbe\u8ba1\u7684\u91cd\u5fc3\u4e0d\u540c\u800c\u5df2\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385525\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : himself65 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             nested function \u662f gnu c \u7684\u72ec\u6709\u8bed\u6cd5<\/p>\n<p>https:\/\/gcc.gnu.org\/onlinedocs\/gcc\/Nested-Functions.html<\/p>\n<p>@msg7086                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385526\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : msg7086 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @himself65 \u662f\u554a\uff0cGNU C \u91cc\u7684\u3002<br \/>\u4e0d\u8fc7\uff0c\u5982\u679c\u662f GNU C \u91cc\u7684 nested functions \u7684\u8bdd\uff0cGNU C \u662f\u652f\u6301 nested functions \u8bbf\u95ee\u5916\u5c42\u5c40\u90e8\u53d8\u91cf\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385527\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : msg7086 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0a\u9762#10 \u8bf4\u7684\u5176\u5b9e\u5f88\u597d\u3002<br \/>\u9762\u5411\u5bf9\u8c61\u8bbe\u8ba1\u662f\u7ed9\u6570\u636e\u7ed1\u4e0a\u4e86\u65b9\u6cd5\u3002<br \/>\u9762\u5411\u95ed\u5305\u8bbe\u8ba1\u662f\u7ed9\u65b9\u6cd5\u7ed1\u4e0a\u4e86\u6570\u636e\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385528\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : LeeReamond <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @seki \u8fd9\u91cc\u53ea\u662f\u4e3e\u4f8b\uff0c\u4e0d\u8ba8\u8bba\u5b9e\u73b0\u672c\u8eab\uff0c\u7528 var \u548c let \u4e0d\u5f71\u54cd\u4ee3\u7801\u884c\u4e3a\uff0c\u6211\u89c9\u5f97\u7528 var \u66f4\u80fd\u4f53\u73b0\u4e00\u4e9b\u7279\u70b9\u6240\u4ee5\u7528\u4e86 var                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385529\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : LeeReamond <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Mithril \u611f\u8c22\u56de\u590d\uff0c\u4f46\u6211\u89c9\u5f97\u8fd9\u4e2a\u4e0d\u7b97\u505a\u95ee\u9898\u7684\u89e3\u7b54\uff0c\u56e0\u4e3a\u5355\u7eaf\u8ba8\u8bba\u7279\u6027\u7684\u8bdd\u5927\u90e8\u5206\u8bed\u8a00\u5f80\u5f80\u517c\u5177\u4e24\u79cd\uff0c\u5373\u4ed6\u53ef\u4ee5\u9762\u5411\u5bf9\u8c61\uff0c\u540c\u65f6\u4e5f\u53ef\u4ee5\u4f7f\u7528\u95ed\u5305\u4fdd\u5b58\u72b6\u6001\uff0c\u4f46\u662f\u8fd9\u4e0d\u5f71\u54cd\u4e0d\u540c\u8bed\u8a00\u5bf9\u547d\u540d\u7a7a\u95f4\u7684\u5904\u7406                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385530\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : LeeReamond <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @msg7086 \u6211\u662f\u624b\u673a\u53d1\u5e16\u6ca1\u6cd5\u76f4\u63a5\u6d4b\u8bd5\uff0c\u6211\u4e0a\u6587\u7684\u4ee3\u7801\u91cc gcc \u4e2d func \u53ef\u4ee5\u76f4\u63a5\u4fee\u6539 data \uff1f\u8fd9\u4e48\u9b54\u5e7b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385531\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : msg7086 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @LeeReamond <\/p>\n<p>#include &lt;stdio.h&gt;<\/p>\n<p>int main() {<br \/> int data = 0;<br \/> void func() {<br \/> data = 3;<br \/> }<br \/> printf(&#8220;%dn&#8221;, data);<br \/> func();<br \/> printf(&#8220;%dn&#8221;, data);<br \/>}<\/p>\n<p># .\/test<br \/>0<br \/>3                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385532\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : LeeReamond <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @msg7086 \u6bd4\u8f83\u9707\u60ca\uff0c\u6709\u79cd\u8fd9\u4e48\u591a\u5e74 C \u8bed\u8a00\u5b66\u7684\u90fd\u662f\u9519\u7684\u611f\u89c9\u3002C \u662f\u5c11\u6570\u4e13\u95e8\u5543\u8fc7\u8bed\u6cd5\u4e66\u7684\u8bed\u8a00\uff0c\u4f46\u662f\u8fd9\u4e48\u591a\u5e74\u5176\u5b9e\u6ca1\u600e\u4e48\u5199\u8fc7\u3002\u6240\u4ee5\u610f\u601d\u662f\u4e3b\u6d41\u8bed\u8a00\u7684\u8bbe\u8ba1\uff0cGNU \u7684 C\uff0cjava\uff0cjs\uff0c\u90fd\u662f\u53ef\u4ee5\u5b9e\u73b0\u80fd\u8bbf\u95ee\u5373\u80fd\u4fee\u6539\u7684\uff0cpy \u5c5e\u4e8e\u5f02\u7c7b\uff1f\u90a3\u4e48\u7981\u6b62\u4fee\u6539\u8fd9\u662f\u4e00\u79cd\u9519\u8bef\u7684\u8bbe\u8ba1\u4e48                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385533\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : msg7086 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @LeeReamond <br \/>Again\uff0c\u8fd9\u4e0d\u662f C \u8bed\u8a00\uff0c\u8fd9\u662f GNU C \u6269\u5c55\u3002nested functions \u4e0d\u662f C \u6807\u51c6\u3002<\/p>\n<p>\u7136\u540e\uff0c\u4e0d\u5b9e\u73b0\u4e00\u79cd\u529f\u80fd\u5e76\u4e0d\u610f\u5473\u7740\u662f\u7981\u6b62\u4f60\u3002<br \/>\u6bd4\u5982\u8bf4\u4f60\u7684\u5171\u4eab\u5355\u8f66\u6ca1\u6cd5\u8dd1\u5230 200 \u516c\u91cc\u7684\u901f\u5ea6\uff0c\u5e76\u4e0d\u662f\u56e0\u4e3a\u5355\u8f66\u7981\u6b62\u4f60\u9a91\u90a3\u4e48\u5feb\uff0c\u53ea\u662f\u56e0\u4e3a\u4f60\u817f\u6ca1\u90a3\u4e48\u5927\u529b\u800c\u5df2\u3002<\/p>\n<p>\u6bd4\u5982\u8bf4\uff0cC \u8bed\u8a00\uff0c\u4e0d\u652f\u6301\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\uff0c\u4e0d\u652f\u6301\u9762\u5411\u95ed\u5305\u7f16\u7a0b\uff0c\u4e0d\u652f\u6301\u51fd\u6570\u5f0f\u7f16\u7a0b\u3002<br \/>\uff08\u514d\u6760\u58f0\u660e\uff1a\u5f3a\u884c\u505a\u662f\u53ef\u4ee5\u505a\u7684\uff0c\u53ea\u662f\u6ca1\u6709\u539f\u751f\u7684\u8bed\u8a00\u7279\u6027\u652f\u6301\u800c\u5df2\u3002\uff09<br \/>\u6240\u4ee5\u5c31\u53ea\u662f\u4e0d\u652f\u6301\u800c\u5df2\uff0c\u4ed6\u6ca1\u8fd9\u80fd\u529b\u3002<br \/>\u4f60\u4e0d\u80fd\u8bf4\u4ed6\u7981\u6b62\u4f60\u505a\u8fd9\u4e9b\u4e8b\u60c5\u3002<br \/>\u4ed6\u8fde\u505a\u8fd9\u4e9b\u4e8b\u60c5\u7684\u80fd\u529b\u90fd\u6ca1\u6709\uff0c\u600e\u4e48\u7981\u6b62\uff1f<\/p>\n<p>\u81f3\u4e8e Python \u4fee\u6539\u5168\u5c40\u53d8\u91cf\u7684\u95ee\u9898\u3002<br \/>\u5f53\u7136\u662f\u53ef\u4ee5\u4fee\u6539\u7684\uff0c\u65b9\u6cd5\u4f60\u4e5f\u5199\u51fa\u6765\u4e86\uff0c\u5c31\u662f\u7528 global \u3002<br \/>\u4f60\u4e0d\u80fd\u8bf4 Python \u63d0\u4f9b\u4e86 global\uff0c\u4f60\u4e0d\u7528\uff0c\u8fd8\u5f3a\u884c\u8bf4\u4ed6\u4e0d\u80fd\u7528\u5427\u3002<\/p>\n<p>\u518d\u8fd8\u6709\uff0c\u4e0d\u8981\u975e\u9ed1\u5373\u767d\u3002\u4efb\u4f55\u8bbe\u8ba1\u90fd\u6709\u4e24\u9762\u6027\u3002<br \/>\u6bd4\u5982 Python \u548c Ruby \u5c31\u662f\u4e24\u4e2a\u770b\u4e0a\u53bb\u5f88\u50cf\uff0c\u4f46\u662f\u8bbe\u8ba1\u7406\u5ff5\u5b8c\u5b8c\u5168\u5168\u76f8\u53cd\u7684\u8bed\u8a00\u3002<br \/>\u4f46\u662f\u4f60\u4e0d\u80fd\u8bf4\u5176\u4e2d\u4e00\u4e2a\u5c31\u662f\u9519\u8bef\u7684\u3002<br \/>Python \u66f4\u6b7b\u677f\uff0c\u6240\u4ee5\u5199\u8d77\u6765\u5f88\u96be\u53d7\uff08\u5197\u957f\uff09\uff0c\u4f46\u662f\u9002\u5408\u5927\u56e2\u961f\u91cf\u4ea7\u7a0b\u5e8f\u5458\u7528\uff0c\u4eba\u4eba\u90fd\u80fd\u5199\u51fa\u5dee\u4e0d\u591a\u7684\u4ee3\u7801\u3002<br \/>Ruby \u66f4\u7075\u6d3b\uff0c\u5e72\u4e00\u4ef6\u4e8b\u60c5\u80fd\u6709\u5341\u79cd\u5199\u6cd5\uff08\u800c\u4e14\u5927\u90fd\u80fd\u5199\u5f97\u5f88\u6f02\u4eae\uff09\uff0c\u4f46\u662f\u4e00\u4e0d\u5c0f\u5fc3\u9ed1\u9b54\u6cd5\u7528\u591a\u4e86\uff0c\u5c31\u53ea\u5269\u4e0a\u5e1d\u80fd\u770b\u61c2\u4e86\u3002<\/p>\n<p>\u5982\u679c\u6bcf\u79cd\u8bed\u8a00\u90fd\u662f\u540c\u6837\u7684\u8bbe\u8ba1\uff0c\u90a3\u8fd8\u8981\u90a3\u4e48\u591a\u8bed\u8a00\u5e72\u4ec0\u4e48\uff0c\u53ea\u7559\u4e0b\u5176\u4e2d\u4e00\u4e2a\u5c31\u884c\u4e86\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385534\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : msg7086 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53e6\u5916\uff0c\u4e0d\u540c\u7684\u8bed\u8a00\u5728\u8bbe\u8ba1\u4e0a\u5dee\u5f97\u5f88\u8fdc\u5f88\u8fdc\u3002<br \/>\u6bd4\u5982\u540c\u6837\u662f\u9762\u5411\u5bf9\u8c61\u7684 Java \u548c Ruby\uff0c\u6211\u53ef\u4ee5\u4e3e\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\u3002<br \/>\u5728 Java \u91cc\uff0c\u5982\u679c\u6709\u4ee3\u7801 obj1.data = 1\uff0cJava \u4f1a\u5728 obj1 \u91cc\u627e\u5230 data \u5b57\u6bb5\uff0c\u7136\u540e\u628a 1 \u8d4b\u503c\u4e0a\u53bb\u3002<br \/>\u5728 Ruby \u91cc\uff0c\u540c\u6837\u7684\u4ee3\u7801\uff0cRuby \u4f1a\u7ed9 obj1 \u53d1\u9001\u4e00\u4e2a\u6d88\u606f\uff0c\u6267\u884c\u4e00\u4e2a\u53eb data= \u7684\u51fd\u6570\uff0c\u628a 1 \u4f5c\u4e3a\u53c2\u6570\u4f20\u8fc7\u53bb\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385535\" 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>                                                             \u5373\u4f7f JAVA \u4e2d\u95ed\u5305\u60f3\u8981\u7528\u5230\u7c7b\u4f3c\u9898\u5e72\u4e2d\u7684 data \u53d8\u91cf\u4e5f\u662f\u9700\u8981\u628a data \u53d8\u91cf\u9884\u5148\u6807\u8bb0\u4e3a final \u7684\u5427\u3002<\/p>\n<p>\u8fd9\u4e2a\u66f4\u591a\u611f\u89c9\u662f\u8bed\u8a00\u8bbe\u8ba1\u4e0a\u7684\u53d6\u820d\uff0c\u5bf9\u4e8e\u8f83\u4e3a\u57fa\u672c\u6570\u636e\u7c7b\u578b\uff0c\u95ed\u5305\u4e2d\u5230\u5e95\u6355\u83b7\u7684\u662f\u503c\u8fd8\u662f\u5f15\u7528\u3002JAVA \u5c31\u5f3a\u8feb\u8ba9\u4f60\u5199\u51fa\u4e0d\u4f1a\u72af\u9519\u7684\u4ee3\u7801\uff0c\u4f46\u540c\u65f6\u8981\u8fbe\u6210\u7c7b\u4f3c\u7684\u4e8b\u60c5\uff08\u5984\u56fe\u5728\u95ed\u5305\u4e2d\u4fee\u6539\u6355\u83b7\u7684\u53d8\u91cf\u7684\u503c\uff09\u5c31\u9700\u8981\u7528\u5f15\u7528\u7c7b\u578b\u5305\u88c5\u4e00\u4e0b\u8fd9\u4e2a\u53d8\u91cf\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385536\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : nlzy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             &gt; Javascript \u7684\u95ed\u5305\u7279\u6027\u662f\u5426\u6765\u6e90\u4e8e\u67d0\u79cd\u8bbe\u8ba1\u5931\u8bef\uff1f\u6216\u662f\u67d0\u79cd\u8bbe\u8ba1\u9886\u5148\uff1f<br \/>\u8fd9\u4e2a\u7279\u6027\u6765\u6e90\u4e8e Scheme\uff0cJavaScript \u7684\u8bbe\u8ba1\u5f88\u5927\u7a0b\u5ea6\u4e0a\u53d7\u5230\u4e86 Scheme \u7684\u5f71\u54cd\u3002\u8fd9\u4e2a\u7279\u6027\u662f JavaScript \u8fd9\u95e8\u72d7\u5c4e\u8bed\u8a00\u91cc\u5c11\u6570\u4e0d\u591a\u7684\u201c\u6284\u5bf9\u4e86\u201d\u7684\u5730\u65b9\uff0c\u8fd9\u4e2a\u7279\u6027\u518d\u52a0\u4e0a JavaScript \u5bf9 first-class function \u7684\u652f\u6301\uff0c\u4f7f\u5f97 JavaScript \u6709\u4e86\u4e0d\u9519\u7684\u201c\u51fd\u6570\u5f0f\u201d\u7f16\u7a0b\u80fd\u529b\uff0c\u8bed\u8a00\u7684\u8868\u8fbe\u529b\u548c\u7075\u6d3b\u6027\u90fd\u5927\u5927\u63d0\u9ad8\u4e86\u3002<br \/>\u4f46\u4e5f\u4e0d\u80fd\u8bf4\u9886\u5148\uff0c\u56e0\u4e3a\u5b83\u53ea\u662f\u5728\u7167\u6284 Scheme\uff0c\u800c Scheme \u662f 1973 \u5e74\u7684\u7f16\u7a0b\u8bed\u8a00\u4e86\u3002<\/p>\n<p>&gt; \u5176\u4ed6\u8bed\u8a00\u4e2d\u4e0d\u90fd\u662f\u5982\u6b64\u8bbe\u8ba1\u7684\uff1f<br \/>\u73b0\u4ee3\u7684\u652f\u6301 first-class function \u7684\u8bed\u8a00\u5f88\u591a\u90fd\u662f\u8fd9\u6837\u7684\u3002\u4e0d\u652f\u6301 first-class function \u7684\u8bed\u8a00\uff0c\u6bd4\u5982 C\uff0c\u5c31\u4e0d\u4f1a\u8fd9\u4e48\u8bbe\u8ba1\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385537\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : nlzy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @nlzy #22 \u4fee\u6b63\uff1aC \u4e5f\u652f\u6301\u51fd\u6570\u6307\u9488\uff0c\u4e5f\u80fd\u7b97 first-class function\uff0c\u53ea\u662f\u8fd9\u73a9\u610f\u6bd4\u8d77\u522b\u7684\u8bed\u8a00\u91cc\u7684\u51fd\u6570\uff0c\u5b83\u5b9e\u5728\u662f\u592a\u96be\u7528\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385538\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Cbdy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Java \u4e5f\u6709\u95ed\u5305\uff0c\u5f88\u6b63\u5e38                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385539\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lcwylxx921 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6b63\u5982\u4e0a\u9762\u6240\u8ba8\u8bba\u7684\uff0cJS \u7684\u95ed\u5305\u6765\u6e90\u4e8e\u51fd\u6570\u5f0f\u8bed\u8a00\uff0c\u5728\u51fd\u6570\u5f0f\u8bed\u8a00\u4e2d\uff0c\u51fd\u6570\u4f5c\u4e3a first-class \u6210\u5458\uff0c\u9700\u8981\u5177\u5907\u4e00\u79cd\u80fd\u529b\u4f7f\u5176\u53ef\u4ee5\u65b9\u4fbf\u5730\u8bbf\u95ee\u5176\u5b9a\u4e49\u8303\u56f4\u4e4b\u5916\u7684\u6570\u636e\uff0c\u5e76\u4e14\u8fd9\u79cd\u8bbf\u95ee\u5728\u597d\u7684\u8bed\u8a00\u8bbe\u8ba1\u4e2d\u5e94\u8be5\u662f\u9075\u5faa lexical scope \u7684\u3002\u6b64\u5916\uff0c\u5173\u4e8e\u4f60\u7ea0\u7ed3\u7684\u662f\u5426\u5141\u8bb8\u4fee\u6539\u95ed\u5305\u6570\u636e\u7684\u95ee\u9898\uff0c\u8fd9\u4e2a\u9996\u5148\u5728\u8bb8\u591a\u7eaf\u51fd\u6570\u5f0f\u8bed\u8a00\uff08\u6bd4\u5982 SML \uff09\u4e2d\uff0c\u6240\u6709\u6570\u636e\u90fd\u662f immutable \u7684\uff0c\u4e5f\u5c31\u8c08\u4e0d\u4e0a\u662f\u5426\u5141\u8bb8\u4fee\u6539\u95ed\u5305\u4e86\uff0c\u4f46\u662f\uff0c\u51fa\u4e8e\u7075\u6d3b\u6027\u7684\u8003\u8651\uff0c\u90e8\u5206\u8bed\u8a00\u653e\u5f00\u4e86\u8fd9\u4e2a\u9650\u5236, \u6bd4\u5982\u5728 Scheme \u4e2d\u52a0\u5165\u4e86 set \uff01\u5173\u952e\u5b57\u53ef\u4ee5\u505a\u4e00\u4e9b assignment \u4ee5\u53ca\u4e00\u4e9b mutable \u7684\u6570\u636e\u7ed3\u6784\uff0c\u4f46\u90fd\u8fd8\u662f\u6709\u4e00\u5b9a\u9650\u5236\u7684\uff0c\u6bd4\u5982\u5bf9 top-level scope \u7684\u4fee\u6539\uff0c\u8fd9\u79cd\u9650\u5236\u662f\u975e\u5e38\u5408\u7406\u7684\uff0c\u53ef\u4ee5\u907f\u514d\u5728\u7a0b\u5e8f\u7684\u5404\u4e2a\u5730\u65b9\u505a\u9876\u5c42\u7684 assignment \u7136\u540e\u5bf9\u5176\u4ed6\u5730\u65b9\u4ea7\u751f\u526f\u4f5c\u7528\u3002\u81f3\u4e8e JS \u4e3a\u4ec0\u4e48\u6beb\u65e0\u9650\u5236\uff0c\u53ea\u80fd\u8bf4 JS \u592a\u7075\u6d3b\u4e86\u5427\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385540\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Mutoo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u73b0\u4ee3\u8bed\u8a00\u5927\u591a\u90fd\u4f7f\u7528\u9759\u6001\u4f5c\u7528\u57df\uff1a\u5373\u51fd\u6570\u5bf9\u5f15\u7528\u7684\u53d8\u91cf\u6709\u4e00\u4e2a\u72ec\u7acb\u7684\u9759\u6001\u8868\u3002\u800c\u5982\u4f55\u6784\u5efa\u8fd9\u4e2a\u8868\u51b3\u5b9a\u4e86\u51fd\u6570\u80fd\u8bbf\u95ee\u7684\u53d8\u91cf\u7684\u8303\u56f4\u3002<\/p>\n<p>\u95ed\u5305\u53ea\u662f\u5bf9\u300c\u51fd\u6570\u5f15\u7528\u4e86\u4e0d\u7531\u5b83\u6240\u5b9a\u4e49\u7684\u81ea\u7531\u53d8\u91cf\u300d\u5f62\u6210\u7684\u4e00\u79cd\u8054\u7cfb\u7684\u5b66\u672f\u547d\u540d\u3002<\/p>\n<p>ref:<br \/>\u4ee3\u7801\u4e4b\u9ad3: \u7f16\u7a0b\u8bed\u8a00\u6838\u5fc3\u6982\u5ff5<br \/>7.2 \u4f5c\u7528\u57df<br \/>11.5 \u95ed\u5305                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385541\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lcwylxx921 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @lcwylxx921 \u53e6\u5916\uff0c \u4f60\u5e94\u8be5\u662f\u5bf9 namespace \u6709\u4ec0\u4e48\u8bef\u89e3\uff0c\u4e00\u822c\u6765\u8bf4 namespace \u662f\u7528\u6765\u505a\u6a21\u5757\u5316\u7684\u5212\u5206\u7684\uff0c\u5728\u95ed\u5305\u8fd9\u4e2a\u8bed\u5883\u4e0b\uff0c\u66f4\u5408\u9002\u7684\u8bcd\u662f scope \u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385542\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : EKkoGG <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @wzb0909 \u7ecf\u5178\u8c1c\u8bed\u4eba                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385543\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : cheng6563 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             c \u8bed\u8a00\u91cc\uff0c}\u4e4b\u540e\u5c40\u90e8\u53d8\u91cf\u5c31\u6ca1\u4e86\uff0c\u5982\u679c\u8fd8\u6709\u6307\u5411\u5c40\u90e8\u53d8\u91cf\u7684\u6307\u9488\u5c31\u4f1a\u53d8\u6210\u91ce\u6307\u9488\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385544\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : avastms <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u7684\u95ee\u9898\u4e0d\u662f\u4e3a\u4ec0\u4e48\u8fd9\u4e48\u8bbe\u8ba1\uff0c\u800c\u662f\u4e3a\u4ec0\u4e48\u8bbe\u8ba1\u4e0d\u7edf\u4e00\uff1f<\/p>\n<p>\u65f6\u4ee3\u4e0d\u4e00\u6837\uff0c\u4f18\u5316\u65b9\u5411\u4e0d\u4e00\u6837\uff0c\u7406\u8bba\u79ef\u7d2f\u4e0d\u4e00\u6837\u3002<\/p>\n<p>\u5916\u90e8\u6761\u4ef6\u4e0d\u505c\u5728\u53d8\uff0c\u7a0b\u5e8f\u8bed\u8a00\u4f7f\u7528\u8005\u504f\u597d\u591a\u79cd\u591a\u6837\uff0c\u6839\u672c\u4e0d\u5b58\u5728\u4e00\u79cd\u666e\u4e16\u7684\u4e0d\u53d8\u7684\u300e\u597d\u7684\u300f\u8bbe\u8ba1\uff0c\u8fd9\u662f\u4e16\u754c\u89c2\u95ee\u9898\u3002<\/p>\n<p>\u5177\u4f53\u5230\u8fd9\u4e2a\u95ee\u9898\uff0c\u662f\u52a8\u6001\u8bed\u8a00\u601d\u6f6e\u51fa\u73b0\u540e\u51fd\u6570\u53ef\u4ee5\u73b0\u573a\u751f\u6210\u5e76\u5728\u7a0b\u5e8f\u5185\u90e8\u4f20\u6765\u4f20\u53bb\uff0c\u8fd9\u9700\u8981\u539f\u672c\u7684\u6808\u5185\u5b58\u6709\u65f6\u9700\u8981\u88ab\u8fc1\u79fb\u5230\u5806\u91cc\uff0c\u8fd9\u624d\u662f\u95ed\u5305\u7684\u6838\u5fc3\uff0c\u800c\u6808\u4e0a\u90e8\u7684\u7a0b\u5e8f\u8bbf\u95ee\u6808\u5e95\u90e8\u7684\u5185\u5b58\uff0c\u539f\u672c\u5c31\u662f\u5929\u7ecf\u5730\u4e49\u7684\uff0c\u548c\u95ed\u5305\u65e0\u5173\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385545\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : renmu123 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             js \u4e2d\u7684\u53d8\u91cf\u63d0\u5347\u548c\u51fd\u6570\u63d0\u5347\u624d\u66f4\u5947\u602a\uff0c\u53d8\u91cf\u63d0\u5347\u597d\u50cf\u662f\u7531\u4e8e\u5f53\u65f6\u865a\u62df\u673a\u7684 bug\uff0c\u51fd\u6570\u63d0\u5347\u662f\u7279\u610f\u8bbe\u8ba1\u3002\u6240\u4ee5 es6 \u5c31\u7528\u4e86 let \u5173\u952e\u5b57\u6765\u9650\u5b9a\u547d\u540d\u7a7a\u95f4\uff0c\u6240\u4ee5\u5c11\u7528 var\uff0c\u4ece\u73b0\u5728\u5f00\u59cb\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385546\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lcwylxx921 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @avastms \u4e0d\u592a\u8ba4\u540c\u4f60\u7684\u89c2\u70b9\u5594\uff0c\u9996\u5148\u201c\u51fd\u6570\u53ef\u4ee5\u73b0\u573a\u751f\u6210\u5e76\u5728\u7a0b\u5e8f\u5185\u90e8\u4f20\u6765\u4f20\u53bb\u201d\u8fd9\u4e2a\u4e0e\u52a8\u6001\u8bed\u8a00\u7684\u601d\u6f6e\u65e0\u5173\uff0c\u8fd9\u4e2a\u662f first-class function \u7684\u7279\u6027\uff0c\u4e0e\u8bed\u8a00\u7684\u9759\u6001\u6216\u8005\u52a8\u6001\u65e0\u5173\u3002\u5176\u6b21\uff0c\u4f60\u8bf4\u7684\u5185\u5b58\u95ee\u9898\u662f\u95ed\u5305\u8fd9\u4e2a\u673a\u5236\u5b9e\u73b0\u4e0a\u7684\u7ec6\u8282\uff0c\u800c\u95ed\u5305\u662f\u4e00\u4e2a\u8bed\u8a00\u8bbe\u8ba1\u4e0a\u7684\u95ee\u9898\uff0c\u8bbe\u8ba1\u4e0a\u7684\u95ee\u9898\u4e0e\u5b9e\u73b0\u65e0\u5173\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385547\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : avastms <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @lcwylxx921 \u6211\u8ba4\u4e3a\u662f\u5148\u6f14\u5316\u51fa\u8fd9\u79cd\u5b9e\u73b0\u673a\u5236\uff0c\u4e4b\u540e\u518d\u88ab\u603b\u7ed3\u6210\u4e13\u6709\u540d\u8bcd\u53eb\u505a\u95ed\u5305\uff0c\u518d\u88ab\u540e\u4eba\u501f\u9274\u5f15\u7528\u6210\u4e3a\u4e00\u79cd\u8bbe\u8ba1\uff0c\u800c\u4e0d\u662f\u4ece\u4e00\u5f00\u59cb\u5c31\u60f3\u597d\u7684\uff0c\u79c0\u624d\u9020\u53cd\u5341\u5e74\u4e0d\u6210                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385548\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : avastms <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u95ed\u5305\u548c\u4f5c\u7528\u57df\u90fd\u662f\u5c0f\u70b9\uff0c\u662f\u670d\u52a1\u4e8e\u66f4\u5927\u76ee\u6807\u7684\uff0c\u66f4\u591a\u662f\u4e00\u79cd\u5fc5\u7ecf\u4e4b\u8def\u800c\u4e0d\u662f\u5320\u5fc3\u72ec\u5177\uff0c\u800c\u4e14\u90fd\u662f\u6f14\u5316\u51fa\u6765\u7684\uff0c\u6700\u540e\u88ab\u8d77\u4e86\u4e13\u95e8\u7684\u540d\u5b57\u800c\u5df2                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385549\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : misaka19000 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u79cd\u95ee\u9898\u4e0d\u5b58\u5728\u4f18\u52a3\uff0c\u53ea\u5b58\u5728\u597d\u6076<\/p>\n<p>\u5c31\u597d\u50cf\u6709\u4eba\u559c\u6b22\u5f3a\u7c7b\u578b\u6709\u4eba\u559c\u6b22\u5f31\u7c7b\u578b                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385550\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hazardous <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @liprais \u9519\u4e86\uff0c\u53d1\u660e javascript \u53ea\u7528\u4e86 10 \u5929\u300221 \u5929\u7684\u662f\u300a 21 \u5929\u7cbe\u901a***\u300b\u7cfb\u5217                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385551\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Anshi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u867d\u7136\u4f46\u662f\uff0cLZ \u8ba8\u8bba\u7684\u662f\u95ed\u5305\u5417\uff0c\u6211\u600e\u4e48\u89c9\u5f97\u53ea\u662f\u8bcd\u6cd5\u4f5c\u7528\u57df\u94fe\u7684\u8bbe\u8ba1\uff1f\u95ed\u5305\u4e0d\u662f\u5728\u51fd\u6570\u5916\u90e8\u4f7f\u7528\u4e86\u51fd\u6570\u5185\u90e8\u7684\u53d8\u91cf\u7b49&#8230;.(?)                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385552\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ylrshui <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @LeeReamond <br \/>\u90fd\u53ea\u662f\u5185\u5b58\u9b54\u6cd5\u800c\u5df2\uff0c\u53ea\u8981\u4f60\u77e5\u9053\u90a3\u4e2a\u6570\u636e\u5728\u54ea\uff0c\u90fd\u80fd\u4fee\u6539\u3002\u53ea\u662f\u6709\u4e9b\u8bed\u8a00\u544a\u8bc9\u4f60\u6570\u636e\u5728\u54ea\uff0c\u5e76\u7ed9\u4f60\u8bbe\u8ba1\u4e86\u65b9\u6cd5\uff0c\u6709\u4e9b\u8bed\u8a00\u4e0d\u544a\u8bc9\u4f60\uff0c\u4e5f\u4e0d\u7ed9\u4f60\u65b9\u6cd5\u3002C \u8bed\u8a00\u7ed9\u4e86\u4f60\u4e00\u4e2a\u901a\u7528\u65b9\u6cd5\uff0c\u53ef\u4ee5\u4fee\u6539\u4efb\u4f55\u5730\u65b9\u7684\u6570\u636e\uff0c\u4f46\u5b83\u4e0d\u544a\u8bc9\u4f60\u6570\u636e\u5728\u54ea\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385553\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : LeeReamond <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @misaka19000 \u9898\u5916\u8bdd\uff0c\u6211\u89c9\u5f97\u559c\u6b22\u52a8\u6001\u7c7b\u578b\u7684\u4eba\u4e0d\u5c11\uff0c\u4f46\u5e94\u8be5\u4e0d\u4f1a\u6709\u4eba\u559c\u6b22\u5f31\u7c7b\u578b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385554\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : DOLLOR <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             JS \u4e00\u822c\u6ca1\u6709\u201c\u547d\u540d\u7a7a\u95f4\u201d\uff08 namespace \uff09\u8fd9\u79cd\u8bf4\u6cd5\uff0c\u5728\u4f60\u8fd9\u8bed\u5883\u4e0b\u5e94\u8be5\u53eb\u201c\u4f5c\u7528\u57df\u201d\uff08 scope \uff09\u3002<br \/>\u5728 JS \u5f15\u5165\u5757\u7ea7\u4f5c\u7528\u57df\u4e4b\u524d\uff0c\u95ed\u5305\u901a\u5e38\u662f\u7528\u4e24\u4e2a\u5d4c\u5957\u51fd\u6570\u6765\u5b9e\u73b0\u7684\u3002\u800c\u5f15\u5165\u5757\u7ea7\u4f5c\u7528\u57df\u4e4b\u540e\uff0c\u5229\u7528{}\u5c31\u80fd\u5b9e\u73b0\u95ed\u5305\uff1a<\/p>\n<p>let getA;<br \/>{<br \/> let a = 10;<br \/> getA = () =&gt; console.log(a);<br \/>}<br \/>getA();\/\/ 10<\/p>\n<p>\u6240\u4ee5\u4e0d\u8981\u89c9\u5f97\u95ed\u5305\u662f\u4ec0\u4e48\u9ad8\u6df1\u83ab\u6d4b\u7684\u4e1c\u897f\uff0c\u5b83\u7684\u5176\u5b9e\u5c31\u662f\u201c\u5185\u90e8\u4f5c\u7528\u57df\u8bbf\u95ee\u4e86\u5916\u90e8\u4f5c\u7528\u57df\u7684\u53d8\u91cf\u201d\u8fd9\u4e48\u7b80\u5355\u7684\u4e8b\u3002<br \/>\u4f5c\u7528\u57df\u53ef\u4ee5\u5c42\u5c42\u5d4c\u5957\uff0c\u5e76\u4e14\u5185\u90e8\u4f5c\u7528\u57df\u53ef\u4ee5\u8bbf\u95ee\u5916\u90e8\u4f5c\u7528\u57df\u7684\u53d8\u91cf\uff0c\u8fd9\u5728\u8bb8\u591a\u7f16\u7a0b\u8bed\u8a00\u770b\u6765\uff0c\u4e0d\u662f\u5f88\u5929\u7ecf\u5730\u4e49\u7684\u4e8b\u60c5\u5417\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385555\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Mohanson <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @LeeReamond \u79d1\u666e\u4e0b c \u662f\u5f31\u7c7b\u578b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385556\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : LeeReamond <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Mohanson \u6211\u89c9\u5f97\u4e0d\u8981\u4e71\u79d1\u666e\uff0c\u5f31\u68c0\u67e5\u8ddf\u5f31\u7c7b\u578b\u662f\u4e24\u4e2a\u6982\u5ff5\u3002char \u80fd\u548c int \u76f8\u52a0\u6709\u8f7b\u6613\u660e\u786e\u7684\u5e95\u5c42\u903b\u8f91\uff0c\u4e0e js \u7684 1+&#8217;1&#8217;\u4e0d\u662f\u4e00\u4e2a\u6982\u5ff5                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385557\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mxT52CRuqR6o5 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             nested function \u548c\u95ed\u5305\u8fd8\u662f\u5dee\u5f88\u591a\u5427                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385558\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yzqtdu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u9898\u5916\u8bdd\uff0c\u4e0d\u77e5\u4e3b\u6709\u6ca1\u6709\u770b\u8fc7 Programming Language Pragmatics\uff0c\u4e66\u91cc\u8fd8\u6709\u66f4\u591a\u4e0d\u540c\u8bed\u8a00\u5947\u5947\u602a\u602a\u7684\u7279\u6027                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385559\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Leviathann <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u89c9\u5f97\u95ed\u5305\u8fd9\u4e2a\u8bf4\u6cd5\u5728\u4e0d\u540c\u7684\u8bed\u8a00\u91cc\u8868\u793a\u7684\u610f\u4e49\u6709\u70b9\u4e0d\u4e00\u6837\u554a<br \/>\u6709\u7684\u63d0\u6cd5\u662f\u80fd\u6355\u83b7\u5916\u90e8\u53d8\u91cf\u7684\u5c31\u662f\u95ed\u5305\uff0c\u800c\u4e0d\u6355\u83b7\u5916\u90e8\u53d8\u91cf\u7684\u5c31\u662f\u51fd\u6570<br \/>\u800c js \u597d\u50cf\u5f3a\u8c03\u7684\u662f\u51fd\u6570\u8fd4\u56de\u4ee5\u540e\u53ef\u4ee5\u4f7f\u7528\u8fd4\u56de\u5bf9\u8c61\u4e2d\u7684\u51fd\u6570\u64cd\u4f5c\u83b7\u53d6\u95ed\u5305\u5185\u90e8\u7684\u53d8\u91cf                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385560\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : youxiachai <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             lz \u662f\u6ca1\u63a5\u89e6\u8fc7\u51fd\u6570\u5f0f\u6982\u5ff5\u5417&#8230;. \u8fd9\u4e2a\u662f\u8bed\u8a00\u8bbe\u8ba1\u8303\u7574\u7684\u4e1c\u897f\u554a&#8230;.<br \/>\u8981\u641e\u61c2\u8fd9\u4e2a..\u8fd8\u662f\u770b\u770b\u4e00\u4e2a\u7f16\u7a0b\u8bed\u8a00\u662f\u600e\u4e48\u8bbe\u8ba1\u7684..                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385561\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xumng123 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Mithril \u8bb2\u7684\u597d\uff0c\u6570\u636e\u7ed1\u5b9a\u64cd\u4f5c\uff0c\u8fd8\u662f\u64cd\u4f5c\u7ed1\u5b9a\u6570\u636e\uff0c\u592a\u7cbe\u8f9f\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385562\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : libook <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6bcf\u4e00\u79cd\u7f16\u7a0b\u8bed\u8a00\u90fd\u662f\u5728\u7279\u5b9a\u7684\u73af\u5883\u4e0b\uff0c\u4e3a\u4e86\u6ee1\u8db3\u7279\u5b9a\u7684\u9700\u6c42\u800c\u8bbe\u8ba1\u7684\uff1b\u56e0\u4e3a\u73af\u5883\u548c\u9700\u6c42\u4e0d\u662f\u7edf\u4e00\u7684\uff0c\u90a3\u4e48\u81ea\u7136\u4e0d\u540c\u7f16\u7a0b\u8bed\u8a00\u7684\u8bbe\u8ba1\u4e5f\u5e76\u4e0d\u5fc5\u987b\u662f\u7edf\u4e00\u7684\u3002<\/p>\n<p>\u90a3\u4e48\u8981\u60f3\u4e86\u89e3\u4e00\u4e2a\u7f16\u7a0b\u8bed\u8a00\u7684\u7279\u6027\u4e3a\u4ec0\u4e48\u73b0\u5728\u662f\u8fd9\u4e2a\u6837\u5b50\u7684\uff0c\u5c31\u5f97\u4e86\u89e3\u8fd9\u4e2a\u7f16\u7a0b\u8bed\u8a00\u7684\u53d1\u5c55\u5386\u53f2\uff0c\u4ec0\u4e48\u65f6\u671f\u5728\u4ec0\u4e48\u73af\u5883\u4e0b\u9047\u5230\u4e86\u4ec0\u4e48\u9700\u6c42\u5bfc\u81f4\u8bbe\u8ba1\u4e86\u8fd9\u4e2a\u7279\u6027\u3002<\/p>\n<p>JS \u662f\u4ece\u4e00\u4e2a\u6781\u5176\u7b80\u964b\u7684\u8f7b\u811a\u672c\u8bed\u8a00\uff0c\u9010\u6b65\u53d1\u5c55\u4e3a\u73b0\u5728\u8fd9\u6837\u80fd\u80dc\u4efb\u5927\u591a\u6570\u9886\u57df\u7684\u8bed\u8a00\u7684\u3002\u6700\u521d\u6570\u503c\u578b\u5c31\u53ea\u63d0\u4f9b\u4e86\u4e00\u79cd Number \u7c7b\u578b\uff0c\u800c\u4e0d\u662f\u50cf\u5176\u4ed6\u8bed\u8a00\u4e00\u6837\u4f1a\u5212\u5206 Int \u3001Long \u3001Float \u3001Double \u7b49\u751a\u81f3\u8fd8\u533a\u5206 signed \u548c unsigned\uff0c\u5c31\u662f\u56e0\u4e3a\u6700\u521d\u7684\u9700\u6c42\u5e76\u4e0d\u9700\u8981\u5982\u6b64\u7ec6\u81f4\u5730\u533a\u5206\u6570\u503c\u7c7b\u578b\uff0c\u4e00\u4e2a double \u8db3\u77e3\u88ab\u7528\u6765\u8986\u76d6\u6574\u6570\u3001\u5c0f\u6570\u3001\u8d1f\u6570\u7684\u5e38\u89c1\u8ba1\u7b97\u9700\u6c42\u4e86\uff08\u867d\u7136\u5c0f\u6570\u6709\u7cbe\u5ea6\u635f\u5931\u95ee\u9898\uff0c\u4f46\u603b\u5f52\u662f\u9075\u5faa IEEE \u7684\u6807\u51c6\u548c\u5176\u4ed6\u4e3b\u6d41\u8bed\u8a00\u4fdd\u6301\u4e00\u81f4\u7684\uff09\u3002<br \/>\u5728\u4f5c\u7528\u57df\u4e0a\u4e5f\u4e00\u6837\uff0c\u600e\u4e48\u7b80\u5355\u600e\u4e48\u6765\uff0c\u6700\u7b80\u5355\u7684\u65b9\u6848\u83ab\u8fc7\u4e8e\u6309\u7167\u4ee3\u7801\u5757\u7684\u5d4c\u5957\u5173\u7cfb\u6765\u754c\u5b9a\u4f5c\u7528\u57df\uff0c\u6700\u7ec8\u7684\u6548\u679c\u5c31\u662f JS \u5b50\u5757\u5185\u7684\u4ee3\u7801\u53ef\u4ee5\u76f4\u63a5\u8c03\u7528\u7236\u5757\u7684\u53d8\u91cf\u3002<br \/>\u5bf9\u4e8e\u8d4b\u503c\u548c\u8fd4\u56de\u673a\u5236\uff0c\u641e\u4e00\u4e9b\u6df1 copy \u3001\u6d45 copy \u3001\u6307\u9488\u4ec0\u4e48\u7684\u4e5f\u4f1a\u8ba9\u8bed\u8a00\u6bd4\u8f83\u590d\u6742\uff0c\u7b80\u5355\u4e00\u4e9b\u5c31\u8bbe\u8ba1\u6210\u4e86\u57fa\u672c\u7c7b\u578b\u6df1 copy \u3001\u9ad8\u7ea7\u7c7b\u578b\u5f15\u7528\u3002<br \/>\u540e\u6765\u4e00\u4e9b\u5f00\u53d1\u5728\u4f7f\u7528 JS \u7684\u65f6\u5019\u6709\u4e86\u9650\u5236\u53d8\u91cf\u7684\u53ef\u8bbf\u95ee\u6027\u548c\u64cd\u4f5c\u7684\u9700\u6c42\uff0c\u5948\u4f55 JS \u672c\u8eab\u8bbe\u8ba1\u5f97\u5f88\u7b80\u5355\uff0c\u6ca1\u6709\u4e13\u95e8\u63d0\u4f9b\u5982\u6b64\u9ad8\u7ea7\u7684\u529f\u80fd\uff0c\u4f46\u5728\u638c\u63e1\u4e86\u524d\u9762\u8bf4\u7684\u90a3\u4e9b\u7279\u6027\u540e\u53d1\u73b0\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e9b\u7279\u522b\u7684\u5199\u6cd5\u6765\u8fbe\u5230\u76ee\u7684\uff0c\u8fd9\u4e2a\u5199\u6cd5\u5728\u5176\u4ed6\u4e00\u4e9b\u8bed\u8a00\u4e2d\u4e5f\u6709\u7c7b\u4f3c\u7684\u7528\u6cd5\uff0c\u4e8e\u662f\u4e4e\u6709\u4eba\u7ed9\u8fd9\u79cd\u7528\u6cd5\u8d77\u4e86\u4e2a\u540d\u5b57\u7edf\u79f0\u4e3a\u201c\u95ed\u5305\u201d\u3002<\/p>\n<p>\u7c7b\u4f3c\u7684\u8fd8\u6709\uff0cJS \u4e0d\u4e13\u95e8\u63d0\u4f9b\u7ee7\u627f\u6d3e\u751f\u76f8\u5173\u7279\u6027\uff0c\u4f46\u662f\u4e3a\u4e86\u8282\u7701\u5b58\u50a8\u7a7a\u95f4\u548c\u521b\u5efa\u5bf9\u8c61\u7684\u5f00\u9500\u6240\u4ee5\u8bbe\u8ba1\u4e86\u539f\u578b\u673a\u5236\uff0c\u800c\u7528\u539f\u578b\u94fe\u6070\u597d\u53ef\u4ee5\u6a21\u62df\u51fa\u6765\u7ee7\u627f\u6d3e\u751f\u7684\u673a\u5236\uff0c\u8fd9\u4e2a\u80af\u5b9a\u4e5f\u4e0d\u662f JS \u8bbe\u8ba1\u8005\u7684\u521d\u8877\uff0c\u800c\u662f\u5f00\u53d1\u8005\u4eec\u7684\u667a\u6167\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385563\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Sparetire <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @LeeReamond \u6309\u7167\u4e00\u822c\u7684\u5b9a\u4e49\uff0c\u504f\u5411\u5141\u8bb8\u9690\u5f0f\u7c7b\u578b\u8f6c\u6362\u6765\u8bf4\uff0cC \u7684\u786e\u662f\u5f31\u7c7b\u578b\u3002\u3002\u4e5f\u5efa\u8bae\u4e0d\u8981\u4e71\u53cd\u9a73<br \/>\u53c2\u8003 https:\/\/www.zhihu.com\/question\/19918532\/answer\/21647195                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385564\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ipwx <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53ea\u6709\u6211\u60f3\u5410\u69fd\u4e3b\u4e3e\u7684\u8fd9\u79cd\u65b9\u6cd5\u6709\u70b9 anti-pattern \u561b\u3002\u3002\u3002\u4e00\u4e0d\u5c0f\u5fc3\u5c31\u4f1a\u5199\u9519\u7684\u4e9a\u5b50                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385565\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : LeeReamond <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ipwx \u4e0d\u719f\u6089\u8bbe\u8ba1\u6a21\u5f0f\uff0c\u8bf7\u6559\u6211\u5982\u4f55\u5199\u6bd4\u8f83\u7b26\u5408\u6a21\u5f0f\uff0c\u8c22\u8c22\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385566\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : supermao <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u80af\u5b9a\u4e0d\u662f<br \/>\u5176\u5b83\u8bed\u8a00\u4e5f\u6709\u95ed\u5305                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5385567\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ipwx <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @LeeReamond \u5012\u4e0d\u662f\u8bbe\u8ba1\u6a21\u5f0f\u7684\u95ee\u9898\u3002\u4f60\u60f3\uff0c\u5982\u679c\u4f60\u662f\u4e00\u4e2a\u5927\u51fd\u6570\uff0c\u5916\u9762\u548c\u91cc\u9762\u90fd\u5f88\u957f\u7684\u90a3\u79cd\u3002\u751a\u81f3\u4f60\u662f\u5728\u5faa\u73af\u4f53\u91cc\u9762\u5b9a\u4e49\u4e86\u4e00\u4e2a\u95ed\u5305\uff0c\u7136\u540e\u628a\u95ed\u5305\u5b58\u4e0b\u6765\u6254\u8fdb\u4e00\u4e2a\u5217\u8868\u4e4b\u7c7b\u7684\u3002<\/p>\n<p>\u60f3\u8c61\u4e00\u4e0b\uff0c\u4f60\u5faa\u73af\u4f53\u5916\u9762\u7684\u5faa\u73af\u53d8\u91cf\u662f i\uff0c\u5faa\u73af\u4f53\u5185\u90e8\u4e5f\u5199\u4e86\u4e2a\u5faa\u73af\uff0c\u4e5f\u662f i \u3002\u7136\u540e\u4e00\u4e0d\u5c0f\u5fc3\u4f60\u7528\u7684\u90fd\u662f\uff1a<\/p>\n<p>i = 0<br \/>while i &lt; 100:<br \/>&#8230;i = i + 1<\/p>\n<p>\u7136\u540e\u5c31\u70b8\u4e86\u4e0d\u662f\uff1f\u800c\u4e14\u8fd9\u79cd bug \u8d3c\u96be\u67e5\uff0c\u6bd5\u7adf\u662f\u601d\u7ef4\u76f2\u533a\u3002\u95ed\u5305\u5185\u90e8\u9ed8\u8ba4\u4e0d\u80fd\u6539\u5199\u5916\u90e8\u7684\u53d8\u91cf\u624d\u80fd\u7b26\u5408\u4eba\u7684\u4e00\u822c\u601d\u8003\u6a21\u5f0f\uff08\u5c40\u90e8\u601d\u8003\uff09\u3002<br \/>&#8211; &#8211; &#8211; &#8211;<\/p>\n<p>js \u7684\u8fd9\u4e2a\u4f5c\u7528\u57df\u8986\u76d6\u95ee\u9898\u7531\u6765\u5df2\u4e45\u4e86\u3002\u4e0d\u4ec5\u662f\u95ed\u5305\u95ee\u9898\uff0c\u4f60\u4ee3\u7801\u5199\u957f\u4e00\u70b9\uff0cif while for \u4f5c\u7528\u5757\u5185\u90e8\u7684\u53d8\u91cf\u4e0d\u5c0f\u5fc3\u6539\u5199\u4e86\u5916\u90e8\u53d8\u91cf\u4e5f\u662f\u707e\u96be\u7684\u3002\u6240\u4ee5\u624d\u6709\u4e86 const \u548c let \u8fd9\u4e24\u4e2a\u5173\u952e\u5b57\u66ff\u4ee3 var\uff0c\u907f\u514d\u8fd9\u79cd\u4f5c\u7528\u57df\u6539\u5199\u3002<\/p>\n<p>https:\/\/developer.mozilla.org\/zh-CN\/docs\/Web\/JavaScript\/Reference\/Statements\/let                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>Javascript \u7684\u95ed\u5305\u7279\u6027\u662f&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\/386098"}],"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=386098"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/386098\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=386098"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=386098"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=386098"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}