{"id":10021367,"date":"2026-06-01T02:43:48","date_gmt":"2026-05-31T18:43:48","guid":{"rendered":"https:\/\/itmax.cn\/?p=10021367"},"modified":"2026-06-01T02:43:48","modified_gmt":"2026-05-31T18:43:48","slug":"%e5%bf%ab%e9%80%9f%e5%a4%af%e5%ae%9e-javascrilpt-%e5%9f%ba%e7%a1%80%e7%9a%84-33-%e4%b8%aa%e6%a6%82%e5%bf%b5","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10021367","title":{"rendered":"\u5feb\u901f\u592f\u5b9e JavaScrilpt \u57fa\u7840\u7684 33 \u4e2a\u6982\u5ff5"},"content":{"rendered":"<p>\u4f60\u597d\uff0c\u6211\u662f<a href=\"https:\/\/link.segmentfault.com\/?enc=HO2ZmzryWZZZRi1f0qcO7A%3D%3D.Js%2BrbGMNpqv4TOWmt3lWmKQVk3Ao1rTow%2Fc9Gws4X6U%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">\u51b4\u7fbd<\/a>\u3002<\/p>\n<p><strong>AI \u65f6\u4ee3\uff0c\u5f88\u591a\u540c\u5b66\u5f88\u8ff7\u832b\u3002<\/strong> \u65e2\u60f3\u592f\u5b9e\u57fa\u7840\uff0c\u53c8\u8981\u8ddf\u8fdb AI\uff0c\u4e8e\u662f\u5b66\u8fd9\u5b66\u90a3\uff0c\u6c89\u4e0d\u4e0b\u5fc3\u6765\uff0c\u7ed3\u679c\u4e09\u5929\u6253\u9c7c\u4e24\u5929\u6652\u7f51\u3002<\/p>\n<p>\u6700\u8fd1\u6211\u7cfb\u7edf\u68b3\u7406\u4e86\u4e00\u904d <a href=\"https:\/\/link.segmentfault.com\/?enc=vagj8UmDRMHqYVm7fb4Pog%3D%3D.6ZNnq%2BaWb0KViHfxdEsstS5oJxytU9hwVbyMqJbXNKU%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">33 JavaScript Concepts<\/a> \u8fd9\u4e2a\u9879\u76ee\uff0c\u5b83\u628a JavaScript \u6700\u6838\u5fc3\u7684 33 \u4e2a\u6982\u5ff5\u6574\u7406\u6210\u4e86\u4e00\u4e2a\u5b8c\u6574\u7684\u77e5\u8bc6\u4f53\u7cfb\u3002<\/p>\n<p>\u6211\u53d1\u73b0\uff1a<strong>\u8fd9 33 \u4e2a\u6982\u5ff5\uff0c\u6070\u597d\u8986\u76d6\u4e86\u4ece\u8bed\u8a00\u57fa\u7840\u5230\u5de5\u7a0b\u5b9e\u8df5\u7684\u5b8c\u6574\u94fe\u8def\u3002\u6b63\u662f\u4f60\u5feb\u901f\u592f\u5b9e JavaScrilpt \u57fa\u7840\u7684\u8def\u5f84\u3002<\/strong><\/p>\n<p>\u4eca\u5929\u6211\u5c31\u6309\u7167\u5b66\u4e60\u96be\u5ea6\u548c\u903b\u8f91\u5173\u7cfb\uff0c\u628a\u8fd9 33 \u4e2a\u6982\u5ff5\u91cd\u65b0\u5206\u7c7b\u6574\u7406\uff0c\u5e2e\u4f60\u5efa\u7acb\u4e00\u4e2a\u5b8c\u6574\u7684 JavaScript \u77e5\u8bc6\u6846\u67b6\u3002<\/p>\n<h2>1. \u7c7b\u578b\u7cfb\u7edf\uff1aJavaScript \u7684\u5730\u57fa<\/h2>\n<h3>1.1. \u539f\u59cb\u7c7b\u578b (Primitive Types)<\/h3>\n<p>JavaScript \u6709 7 \u79cd\u539f\u59cb\u7c7b\u578b\uff1a<strong>string\u3001number\u3001bigint\u3001boolean\u3001undefined\u3001null\u3001symbol<\/strong>\u3002<\/p>\n<p>\u5f88\u591a\u4eba\u4ee5\u4e3a\u8fd9\u5f88\u7b80\u5355\uff0c\u4f46\u5176\u5b9e\u5751\u5f88\u591a\uff1a<\/p>\n<pre><code class=\"javascript\">typeof null \/\/ &quot;object&quot; \u274c \u8fd9\u662f JS \u7684\u5386\u53f2 bug\ntypeof NaN  \/\/ &quot;number&quot; \u2705 NaN \u786e\u5b9e\u662f\u6570\u5b57\u7c7b\u578b<\/code><\/pre>\n<p><strong>\u539f\u59cb\u7c7b\u578b\u662f\u4e0d\u53ef\u53d8\u7684\u3002<\/strong> \u5f53\u4f60\u201c\u4fee\u6539\u201d\u4e00\u4e2a\u5b57\u7b26\u4e32\u65f6\uff0c\u5176\u5b9e\u662f\u521b\u5efa\u4e86\u65b0\u5b57\u7b26\u4e32\uff1a<\/p>\n<pre><code class=\"javascript\">let str = &quot;hello&quot;;\nstr[0] = &quot;H&quot;; \/\/ \u65e0\u6548,\u539f\u59cb\u7c7b\u578b\u4e0d\u53ef\u53d8\nstr = &quot;Hello&quot;; \/\/ \u8fd9\u662f\u91cd\u65b0\u8d4b\u503c,\u4e0d\u662f\u4fee\u6539<\/code><\/pre>\n<h3>1.2. \u539f\u59cb\u7c7b\u578b vs \u5bf9\u8c61 (Primitives vs Objects)<\/h3>\n<p>\u8fd9\u662f JavaScript \u6700\u6838\u5fc3\u7684\u533a\u522b\uff1a<strong>\u539f\u59cb\u7c7b\u578b\u6309\u503c\u4f20\u9012\uff0c\u5bf9\u8c61\u6309\u5f15\u7528\u4f20\u9012\u3002<\/strong><\/p>\n<pre><code class=\"javascript\">\/\/ \u539f\u59cb\u7c7b\u578b:\u590d\u5236\u503c\nlet a = 1;\nlet b = a;\nb = 2;\nconsole.log(a); \/\/ 1,a \u4e0d\u53d7\u5f71\u54cd\n\n\/\/ \u5bf9\u8c61:\u590d\u5236\u5f15\u7528\nlet obj1 = { x: 1 };\nlet obj2 = obj1;\nobj2.x = 2;\nconsole.log(obj1.x); \/\/ 2,obj1 \u4e5f\u53d8\u4e86!<\/code><\/pre>\n<p><strong>\u8fd9\u76f4\u63a5\u5f71\u54cd\u4e86\u51fd\u6570\u53c2\u6570\u4f20\u9012\u3001\u6027\u80fd\u4f18\u5316\u3001React \u7684 immutable \u66f4\u65b0\u7b49\u4e00\u7cfb\u5217\u95ee\u9898\u3002<\/strong><\/p>\n<h3>1.3. \u7c7b\u578b\u5f3a\u5236\u8f6c\u6362 (Type Coercion)<\/h3>\n<p>JavaScript \u7684\u9690\u5f0f\u7c7b\u578b\u8f6c\u6362\u662f\u6700\u8ba9\u4eba\u5934\u75bc\u7684\u7279\u6027\u4e4b\u4e00\u3002<\/p>\n<pre><code class=\"javascript\">[] == ![]   \/\/ true \u2753\n[] + []     \/\/ &quot;&quot;\n[] + {}     \/\/ &quot;[object Object]&quot;\n{} + []     \/\/ 0<\/code><\/pre>\n<p>\u4e3a\u4ec0\u4e48 <code>[] == ![]<\/code> \u662f true?<\/p>\n<ol>\n<li><code>![]<\/code> \u5148\u8f6c\u6210 boolean\uff0c\u7a7a\u6570\u7ec4\u662f\u771f\u503c\uff0c\u53d6\u53cd\u5f97 <code>false<\/code><\/li>\n<li><code>[] == false<\/code> \u89e6\u53d1\u7c7b\u578b\u8f6c\u6362<\/li>\n<li><code>[]<\/code> \u8f6c\u6210\u5b57\u7b26\u4e32 <code>&quot;&quot;<\/code><\/li>\n<li><code>&quot;&quot;<\/code> \u8f6c\u6210\u6570\u5b57 <code>0<\/code><\/li>\n<li><code>false<\/code> \u8f6c\u6210\u6570\u5b57 <code>0<\/code><\/li>\n<li><code>0 == 0<\/code> \u4e3a <code>true<\/code><\/li>\n<\/ol>\n<p><strong>\u6240\u4ee5\u6c38\u8fdc\u7528 <\/strong><code>===<\/code><strong> \u800c\u4e0d\u662f <\/strong><code>==<\/code><strong>\uff0c\u9664\u975e\u4f60\u771f\u7684\u77e5\u9053\u81ea\u5df1\u5728\u5e72\u4ec0\u4e48\u3002<\/strong><\/p>\n<h3>1.4. \u76f8\u7b49\u6027\u6bd4\u8f83 (Equality: == vs ===)<\/h3>\n<ul>\n<li><code>==<\/code> \u4f1a\u8fdb\u884c\u7c7b\u578b\u8f6c\u6362\u540e\u6bd4\u8f83<\/li>\n<li><code>===<\/code> \u4e25\u683c\u6bd4\u8f83\uff0c\u7c7b\u578b\u4e0d\u540c\u76f4\u63a5\u8fd4\u56de false<\/li>\n<li><code>Object.is()<\/code> \u66f4\u4e25\u683c\uff0c\u80fd\u6b63\u786e\u5904\u7406 <code>NaN<\/code> \u548c <code>+0\/-0<\/code><\/li>\n<\/ul>\n<pre><code class=\"javascript\">NaN === NaN           \/\/ false\nObject.is(NaN, NaN)   \/\/ true\n\n+0 === -0             \/\/ true\nObject.is(+0, -0)     \/\/ false<\/code><\/pre>\n<h2>2. \u4f5c\u7528\u57df\u4e0e\u6267\u884c\u673a\u5236\uff1aJavaScript \u7684\u8fd0\u884c\u65f6<\/h2>\n<h3>2.1. \u8c03\u7528\u6808 (Call Stack)<\/h3>\n<p>JavaScript \u662f\u5355\u7ebf\u7a0b\u7684\uff0c\u6240\u6709\u51fd\u6570\u8c03\u7528\u90fd\u5728\u4e00\u4e2a\u8c03\u7528\u6808\u91cc\u6309 <strong>LIFO \uff08\u540e\u8fdb\u5148\u51fa\uff09<\/strong> \u6267\u884c\u3002<\/p>\n<pre><code class=\"javascript\">function first() {\n  second();\n  console.log(&quot;first&quot;);\n}\n\nfunction second() {\n  console.log(&quot;second&quot;);\n}\n\nfirst();\n\/\/ \u8f93\u51fa:\n\/\/ &quot;second&quot;\n\/\/ &quot;first&quot;<\/code><\/pre>\n<p><strong>\u6808\u6ea2\u51fa (Stack Overflow) \u5c31\u662f\u8c03\u7528\u6808\u7206\u4e86\uff0c\u901a\u5e38\u662f\u9012\u5f52\u6ca1\u5199\u597d\u3002<\/strong><\/p>\n<h3>2.2. \u4f5c\u7528\u57df\u4e0e\u95ed\u5305 (Scope &#038; Closures)<\/h3>\n<p>JavaScript \u6709 3 \u79cd\u4f5c\u7528\u57df\uff1a<strong>\u5168\u5c40\u4f5c\u7528\u57df\u3001\u51fd\u6570\u4f5c\u7528\u57df\u3001\u5757\u7ea7\u4f5c\u7528\u57df (let\/const)<\/strong>\u3002<\/p>\n<p><strong>\u95ed\u5305<\/strong> \u662f JavaScript \u6700\u5f3a\u5927\u4e5f\u6700\u5bb9\u6613\u51fa\u95ee\u9898\u7684\u7279\u6027\uff1a<strong>\u51fd\u6570\u53ef\u4ee5\u8bbf\u95ee\u5176\u5b9a\u4e49\u65f6\u7684\u5916\u90e8\u53d8\u91cf\uff0c\u5373\u4f7f\u5916\u90e8\u51fd\u6570\u5df2\u7ecf\u6267\u884c\u5b8c\u6bd5\u3002<\/strong><\/p>\n<pre><code class=\"javascript\">function createCounter() {\n  let count = 0;\n  return function() {\n    return ++count;\n  };\n}\n\nconst counter = createCounter();\nconsole.log(counter()); \/\/ 1\nconsole.log(counter()); \/\/ 2<\/code><\/pre>\n<p>\u95ed\u5305\u7684\u5751\uff1a<strong>\u5982\u679c\u4e0d\u5c0f\u5fc3\uff0c\u4f1a\u5bfc\u81f4\u5185\u5b58\u6cc4\u6f0f\u3002<\/strong><\/p>\n<pre><code class=\"javascript\">\/\/ \u274c \u5185\u5b58\u6cc4\u6f0f\u793a\u4f8b\nfunction attachHandler() {\n  const bigData = new Array(1000000).fill(&quot;data&quot;);\n  document.getElementById(&quot;btn&quot;).onclick = function() {\n    console.log(bigData.length); \/\/ \u95ed\u5305\u6301\u6709 bigData\n  };\n}<\/code><\/pre>\n<h3>2.3. this, call, apply &#038; bind<\/h3>\n<p><code>this<\/code> \u662f JavaScript \u6700\u8ba9\u4eba\u56f0\u60d1\u7684\u5173\u952e\u5b57\u3002<strong>\u5b83\u7684\u503c\u4e0d\u662f\u5728\u5b9a\u4e49\u65f6\u786e\u5b9a\u7684\uff0c\u800c\u662f\u5728\u8c03\u7528\u65f6\u786e\u5b9a\u7684\u3002<\/strong><\/p>\n<p>5 \u6761\u7ed1\u5b9a\u89c4\u5219\uff1a<\/p>\n<ol>\n<li><strong>\u9ed8\u8ba4\u7ed1\u5b9a<\/strong>\uff1a<code>this<\/code> \u6307\u5411\u5168\u5c40\u5bf9\u8c61 \uff08\u4e25\u683c\u6a21\u5f0f\u4e0b\u662f <code>undefined<\/code>)<\/li>\n<li><strong>\u9690\u5f0f\u7ed1\u5b9a<\/strong>\uff1a\u4f5c\u4e3a\u5bf9\u8c61\u65b9\u6cd5\u8c03\u7528\uff0c<code>this<\/code> \u6307\u5411\u8be5\u5bf9\u8c61<\/li>\n<li><strong>\u663e\u5f0f\u7ed1\u5b9a<\/strong>\uff1a\u7528 <code>call\/apply\/bind<\/code> \u6307\u5b9a <code>this<\/code><\/li>\n<li><strong>new \u7ed1\u5b9a<\/strong>\uff1a<code>new<\/code> \u521b\u5efa\u65b0\u5bf9\u8c61\uff0c<code>this<\/code> \u6307\u5411\u65b0\u5bf9\u8c61<\/li>\n<li><strong>\u7bad\u5934\u51fd\u6570<\/strong>\uff1a\u6ca1\u6709\u81ea\u5df1\u7684 <code>this<\/code>\uff0c\u7ee7\u627f\u5916\u5c42 <code>this<\/code><\/li>\n<\/ol>\n<pre><code class=\"javascript\">const obj = {\n  name: &quot;obj&quot;,\n  getName: function() {\n    return this.name;\n  },\n  getNameArrow: () =&gt; {\n    return this.name; \/\/ \u7bad\u5934\u51fd\u6570\u7684 this \u6307\u5411\u5916\u5c42\n  }\n};\n\nobj.getName();       \/\/ &quot;obj&quot;\nobj.getNameArrow();  \/\/ undefined (\u5916\u5c42\u662f\u5168\u5c40)\n\nconst fn = obj.getName;\nfn();                \/\/ undefined (\u4e22\u5931\u4e86 this)\nfn.call(obj);        \/\/ &quot;obj&quot; (\u663e\u5f0f\u7ed1\u5b9a)<\/code><\/pre>\n<h2>3. \u9762\u5411\u5bf9\u8c61\uff1a\u539f\u578b\u94fe\u4e0e\u7ee7\u627f<\/h2>\n<h3>3.1. \u539f\u578b\u4e0e\u5bf9\u8c61\u521b\u5efa (Prototypes &#038; Object Creation)<\/h3>\n<p>JavaScript \u4e0d\u662f\u4f20\u7edf\u7684\u7c7b\u7ee7\u627f\uff0c\u800c\u662f <strong>\u539f\u578b\u7ee7\u627f<\/strong>\u3002\u6bcf\u4e2a\u5bf9\u8c61\u90fd\u6709\u4e00\u4e2a\u9690\u85cf\u7684 <code>[[Prototype]]<\/code> \u94fe\u63a5\uff0c\u6307\u5411\u5b83\u7684\u539f\u578b\u5bf9\u8c61\u3002<\/p>\n<pre><code class=\"javascript\">function Person(name) {\n  this.name = name;\n}\n\nPerson.prototype.sayHi = function() {\n  console.log(&quot;Hi, &quot; + this.name);\n};\n\nconst p = new Person(&quot;\u51b4\u7fbd&quot;);\np.sayHi(); \/\/ &quot;Hi, \u51b4\u7fbd&quot;<\/code><\/pre>\n<p><strong>\u5f53\u4f60\u8bbf\u95ee <\/strong><code>p.sayHi<\/code><strong> \u65f6\uff0cJavaScript \u4f1a\u5148\u5728 <\/strong><code>p<\/code><strong> \u81ea\u8eab\u627e\uff0c\u627e\u4e0d\u5230\u5c31\u53bb <\/strong><code>Person.prototype<\/code><strong> \u627e\uff0c\u8fd9\u5c31\u662f\u539f\u578b\u94fe\u3002<\/strong><\/p>\n<h3>3.2. \u7ee7\u627f\u4e0e\u591a\u6001 (Inheritance &#038; Polymorphism)<\/h3>\n<p>ES6 \u7684 <code>class<\/code> \u8bed\u6cd5\u53ea\u662f\u539f\u578b\u7ee7\u627f\u7684\u8bed\u6cd5\u7cd6\uff1a<\/p>\n<pre><code class=\"javascript\">class Animal {\n  constructor(name) {\n    this.name = name;\n  }\n  speak() {\n    console.log(this.name + &quot; makes a sound&quot;);\n  }\n}\n\nclass Dog extends Animal {\n  speak() {\n    console.log(this.name + &quot; barks&quot;);\n  }\n}\n\nconst dog = new Dog(&quot;\u65fa\u8d22&quot;);\ndog.speak(); \/\/ &quot;\u65fa\u8d22 barks&quot; (\u591a\u6001:\u5b50\u7c7b\u8986\u76d6\u7236\u7c7b\u65b9\u6cd5)<\/code><\/pre>\n<h3>3.3. \u5de5\u5382\u51fd\u6570\u4e0e\u7c7b (Factories &#038; Classes)<\/h3>\n<p>\u9664\u4e86 <code>class<\/code>\uff0c\u8fd8\u53ef\u4ee5\u7528\u5de5\u5382\u51fd\u6570\u521b\u5efa\u5bf9\u8c61\uff1a<\/p>\n<pre><code class=\"javascript\">\/\/ \u5de5\u5382\u51fd\u6570\nfunction createPerson(name) {\n  return {\n    name,\n    sayHi() {\n      console.log(&quot;Hi, &quot; + this.name);\n    }\n  };\n}\n\nconst p = createPerson(&quot;\u51b4\u7fbd&quot;);<\/code><\/pre>\n<p><strong>\u5de5\u5382\u51fd\u6570\u66f4\u7075\u6d3b\uff0c\u4e0d\u9700\u8981 <\/strong><code>new<\/code><strong>\uff0c\u4e5f\u4e0d\u7528\u62c5\u5fc3 <\/strong><code>this<\/code><strong> \u4e22\u5931\u3002<\/strong><\/p>\n<h2>4. \u51fd\u6570\u5f0f\u7f16\u7a0b\uff1aJavaScript \u7684\u53e6\u4e00\u9762<\/h2>\n<h3>4.1. \u9ad8\u9636\u51fd\u6570 (Higher-Order Functions)<\/h3>\n<p><strong>\u9ad8\u9636\u51fd\u6570<\/strong> \u662f\u63a5\u6536\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\uff0c\u6216\u8fd4\u56de\u51fd\u6570\u7684\u51fd\u6570\u3002<\/p>\n<pre><code class=\"javascript\">\/\/ \u63a5\u6536\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\nfunction repeat(n, action) {\n  for (let i = 0; i &lt; n; i++) {\n    action(i);\n  }\n}\n\nrepeat(3, console.log); \/\/ 0 1 2\n\n\/\/ \u8fd4\u56de\u51fd\u6570\nfunction multiplier(factor) {\n  return number =&gt; number * factor;\n}\n\nconst double = multiplier(2);\nconsole.log(double(5)); \/\/ 10<\/code><\/pre>\n<h3>4.2. map, reduce, filter<\/h3>\n<p>\u8fd9\u662f\u51fd\u6570\u5f0f\u7f16\u7a0b\u7684\u4e09\u5927\u91d1\u521a\uff1a<\/p>\n<pre><code class=\"javascript\">const numbers = [1, 2, 3, 4, 5];\n\n\/\/ map:\u8f6c\u6362\u6bcf\u4e2a\u5143\u7d20\nnumbers.map(x =&gt; x * 2); \/\/ [2, 4, 6, 8, 10]\n\n\/\/ filter:\u7b5b\u9009\u5143\u7d20\nnumbers.filter(x =&gt; x &gt; 2); \/\/ [3, 4, 5]\n\n\/\/ reduce:\u7d2f\u79ef\u8ba1\u7b97\nnumbers.reduce((sum, x) =&gt; sum + x, 0); \/\/ 15<\/code><\/pre>\n<p><strong>\u94fe\u5f0f\u8c03\u7528\u66f4\u4f18\u96c5\uff1a<\/strong><\/p>\n<pre><code class=\"javascript\">numbers\n  .filter(x =&gt; x &gt; 2)\n  .map(x =&gt; x * 2)\n  .reduce((sum, x) =&gt; sum + x, 0); \/\/ 24<\/code><\/pre>\n<h3>4.3. \u7eaf\u51fd\u6570 (Pure Functions)<\/h3>\n<p><strong>\u7eaf\u51fd\u6570<\/strong> \u6709\u4e24\u4e2a\u7279\u5f81\uff1a<\/p>\n<ol>\n<li>\u76f8\u540c\u8f93\u5165\u6c38\u8fdc\u8fd4\u56de\u76f8\u540c\u8f93\u51fa<\/li>\n<li>\u6ca1\u6709\u526f\u4f5c\u7528 \uff08\u4e0d\u4fee\u6539\u5916\u90e8\u72b6\u6001\uff09<\/li>\n<\/ol>\n<pre><code class=\"javascript\">\/\/ \u2705 \u7eaf\u51fd\u6570\nfunction add(a, b) {\n  return a + b;\n}\n\n\/\/ \u274c \u4e0d\u7eaf:\u4f9d\u8d56\u5916\u90e8\u53d8\u91cf\nlet count = 0;\nfunction increment() {\n  return ++count;\n}\n\n\/\/ \u274c \u4e0d\u7eaf:\u4fee\u6539\u4e86\u53c2\u6570\nfunction addToArray(arr, item) {\n  arr.push(item); \/\/ \u526f\u4f5c\u7528!\n  return arr;\n}<\/code><\/pre>\n<p><strong>\u7eaf\u51fd\u6570\u66f4\u5bb9\u6613\u6d4b\u8bd5\u3001\u8c03\u8bd5\u548c\u4f18\u5316\u3002React \u7684\u51fd\u6570\u7ec4\u4ef6\u5c31\u5e94\u8be5\u662f\u7eaf\u51fd\u6570\u3002<\/strong><\/p>\n<h3>4.4. \u67ef\u91cc\u5316\u4e0e\u51fd\u6570\u7ec4\u5408 (Currying &#038; Composition)<\/h3>\n<p><strong>\u67ef\u91cc\u5316<\/strong> \u662f\u628a\u591a\u53c2\u6570\u51fd\u6570\u8f6c\u6210\u5355\u53c2\u6570\u51fd\u6570\u94fe\uff1a<\/p>\n<pre><code class=\"javascript\">\/\/ \u666e\u901a\u51fd\u6570\nfunction add(a, b, c) {\n  return a + b + c;\n}\n\n\/\/ \u67ef\u91cc\u5316\nfunction curriedAdd(a) {\n  return function(b) {\n    return function(c) {\n      return a + b + c;\n    };\n  };\n}\n\ncurriedAdd(1)(2)(3); \/\/ 6<\/code><\/pre>\n<p><strong>\u51fd\u6570\u7ec4\u5408<\/strong> \u662f\u628a\u591a\u4e2a\u51fd\u6570\u7ec4\u5408\u6210\u4e00\u4e2a\uff1a<\/p>\n<pre><code class=\"javascript\">const compose = (f, g) =&gt; x =&gt; f(g(x));\n\nconst double = x =&gt; x * 2;\nconst square = x =&gt; x * x;\n\nconst doubleThenSquare = compose(square, double);\ndoubleThenSquare(3); \/\/ (3 * 2)\u00b2 = 36<\/code><\/pre>\n<h3>4.5. \u9012\u5f52 (Recursion)<\/h3>\n<p>\u9012\u5f52\u662f\u51fd\u6570\u8c03\u7528\u81ea\u5df1\u3002\u7ecf\u5178\u7684\u9636\u4e58\uff1a<\/p>\n<pre><code class=\"javascript\">function factorial(n) {\n  if (n &lt;= 1) return 1; \/\/ \u57fa\u7840\u60c5\u51b5\n  return n * factorial(n - 1); \/\/ \u9012\u5f52\u8c03\u7528\n}\n\nfactorial(5); \/\/ 120<\/code><\/pre>\n<p><strong>\u9012\u5f52\u7684\u5751\uff1a\u5bb9\u6613\u6808\u6ea2\u51fa\u3002<\/strong> \u53ef\u4ee5\u7528\u5c3e\u9012\u5f52\u4f18\u5316\u6216\u6539\u6210\u5faa\u73af\u3002<\/p>\n<h2>5. \u5f02\u6b65\u7f16\u7a0b\uff1aJavaScript \u7684\u7cbe\u9ad3<\/h2>\n<h3>5.1. \u56de\u8c03\u51fd\u6570 (Callbacks)<\/h3>\n<p>\u6700\u65e9\u7684\u5f02\u6b65\u65b9\u6848\uff0c\u4f46\u5bb9\u6613\u9677\u5165 <strong>\u56de\u8c03\u5730\u72f1<\/strong>\uff1a<\/p>\n<pre><code class=\"javascript\">getData(function(a) {\n  getMoreData(a, function(b) {\n    getMoreData(b, function(c) {\n      getMoreData(c, function(d) {\n        \/\/ \u56de\u8c03\u5730\u72f1 \ud83d\udd25\n      });\n    });\n  });\n});<\/code><\/pre>\n<h3>5.2. Promise<\/h3>\n<p>Promise \u89e3\u51b3\u4e86\u56de\u8c03\u5730\u72f1\uff0c\u8ba9\u5f02\u6b65\u4ee3\u7801\u66f4\u4f18\u96c5\uff1a<\/p>\n<pre><code class=\"javascript\">getData()\n  .then(a =&gt; getMoreData(a))\n  .then(b =&gt; getMoreData(b))\n  .then(c =&gt; getMoreData(c))\n  .catch(err =&gt; console.error(err));<\/code><\/pre>\n<p><strong>Promise \u6709 3 \u79cd\u72b6\u6001\uff1apending\u3001fulfilled\u3001rejected\u3002\u72b6\u6001\u4e00\u65e6\u6539\u53d8\u5c31\u4e0d\u53ef\u9006\u3002<\/strong><\/p>\n<h3>5.3. async\/await<\/h3>\n<p>async\/await \u662f Promise \u7684\u8bed\u6cd5\u7cd6\uff0c\u8ba9\u5f02\u6b65\u4ee3\u7801\u770b\u8d77\u6765\u50cf\u540c\u6b65\uff1a<\/p>\n<pre><code class=\"javascript\">async function fetchData() {\n  try {\n    const a = await getData();\n    const b = await getMoreData(a);\n    const c = await getMoreData(b);\n    return c;\n  } catch (err) {\n    console.error(err);\n  }\n}<\/code><\/pre>\n<p><strong>\u5e76\u884c\u6267\u884c\u7528 <\/strong><code>Promise.all<\/code><strong>:<\/strong><\/p>\n<pre><code class=\"javascript\">const [user, posts] = await Promise.all([\n  fetchUser(),\n  fetchPosts()\n]);<\/code><\/pre>\n<h3>5.4. Event Loop \uff08\u4e8b\u4ef6\u5faa\u73af\uff09<\/h3>\n<p><strong>\u8fd9\u662f JavaScript \u5f02\u6b65\u7684\u6838\u5fc3\u673a\u5236\u3002<\/strong><\/p>\n<p>JavaScript \u662f\u5355\u7ebf\u7a0b\u7684\uff0c\u4f46\u901a\u8fc7 Event Loop \u5b9e\u73b0\u4e86\u5f02\u6b65\uff1a<\/p>\n<ol>\n<li><strong>\u8c03\u7528\u6808<\/strong> \u6267\u884c\u540c\u6b65\u4ee3\u7801<\/li>\n<li>\u5f02\u6b65\u4efb\u52a1\u653e\u5165 <strong>\u4efb\u52a1\u961f\u5217<\/strong><\/li>\n<li>\u8c03\u7528\u6808\u6e05\u7a7a\u540e\uff0cEvent Loop \u4ece\u961f\u5217\u53d6\u4efb\u52a1\u6267\u884c<\/li>\n<\/ol>\n<p><strong>\u5fae\u4efb\u52a1 (Microtask) \u4f18\u5148\u7ea7\u9ad8\u4e8e\u5b8f\u4efb\u52a1 (Macrotask):<\/strong><\/p>\n<pre><code class=\"javascript\">console.log(&quot;1&quot;);\n\nsetTimeout(() =&gt; console.log(&quot;2&quot;), 0); \/\/ \u5b8f\u4efb\u52a1\n\nPromise.resolve().then(() =&gt; console.log(&quot;3&quot;)); \/\/ \u5fae\u4efb\u52a1\n\nconsole.log(&quot;4&quot;);\n\n\/\/ \u8f93\u51fa:1 4 3 2<\/code><\/pre>\n<p><strong>\u4e3a\u4ec0\u4e48\uff1f\u56e0\u4e3a Promise \u7684 <\/strong><code>.then<\/code><strong> \u662f\u5fae\u4efb\u52a1\uff0c\u5728\u5f53\u524d\u5b8f\u4efb\u52a1\u7ed3\u675f\u540e\u7acb\u5373\u6267\u884c\uff0c\u800c <\/strong><code>setTimeout<\/code><strong> \u662f\u5b8f\u4efb\u52a1\uff0c\u8981\u7b49\u4e0b\u4e00\u8f6e\u3002<\/strong><\/p>\n<h3>5.5. \u751f\u6210\u5668\u4e0e\u8fed\u4ee3\u5668 (Generators &#038; Iterators)<\/h3>\n<p>\u751f\u6210\u5668\u51fd\u6570\u53ef\u4ee5\u6682\u505c\u548c\u6062\u590d\u6267\u884c\uff1a<\/p>\n<pre><code class=\"javascript\">function* idGenerator() {\n  let id = 1;\n  while (true) {\n    yield id++;\n  }\n}\n\nconst gen = idGenerator();\nconsole.log(gen.next().value); \/\/ 1\nconsole.log(gen.next().value); \/\/ 2<\/code><\/pre>\n<p><strong>\u751f\u6210\u5668\u53ef\u4ee5\u5b9e\u73b0\u60f0\u6027\u6c42\u503c\u3001\u65e0\u9650\u5e8f\u5217\u7b49\u9ad8\u7ea7\u7279\u6027\u3002<\/strong><\/p>\n<h2>6. \u6d4f\u89c8\u5668\u4e0e Web API<\/h2>\n<h3>6.1. DOM \u64cd\u4f5c (DOM Manipulation)<\/h3>\n<pre><code class=\"javascript\">\/\/ \u9009\u62e9\u5143\u7d20\nconst el = document.querySelector(&quot;.class&quot;);\n\n\/\/ \u4fee\u6539\u5185\u5bb9\nel.textContent = &quot;\u65b0\u5185\u5bb9&quot;;\n\n\/\/ \u6dfb\u52a0\u4e8b\u4ef6\nel.addEventListener(&quot;click&quot;, () =&gt; {\n  console.log(&quot;clicked&quot;);\n});<\/code><\/pre>\n<p><strong>\u6027\u80fd\u4f18\u5316\uff1a\u6279\u91cf DOM \u64cd\u4f5c\u7528 DocumentFragment\uff0c\u907f\u514d\u9891\u7e41\u91cd\u6392\u91cd\u7ed8\u3002<\/strong><\/p>\n<h3>6.2. HTTP &#038; Fetch API<\/h3>\n<pre><code class=\"javascript\">\/\/ GET \u8bf7\u6c42\nconst response = await fetch(&quot;https:\/\/api.example.com\/data&quot;);\nconst data = await response.json();\n\n\/\/ POST \u8bf7\u6c42\nawait fetch(&quot;https:\/\/api.example.com\/data&quot;, {\n  method: &quot;POST&quot;,\n  headers: { &quot;Content-Type&quot;: &quot;application\/json&quot; },\n  body: JSON.stringify({ name: &quot;\u51b4\u7fbd&quot; })\n});<\/code><\/pre>\n<h3>6.3. Web Workers<\/h3>\n<p>Web Workers \u8ba9 JavaScript \u53ef\u4ee5\u591a\u7ebf\u7a0b\u8fd0\u884c\uff1a<\/p>\n<pre><code class=\"javascript\">\/\/ \u4e3b\u7ebf\u7a0b\nconst worker = new Worker(&quot;worker.js&quot;);\nworker.postMessage({ data: &quot;heavy computation&quot; });\nworker.onmessage = (e) =&gt; {\n  console.log(&quot;Result:&quot;, e.data);\n};\n\n\/\/ worker.js\nself.onmessage = (e) =&gt; {\n  const result = heavyComputation(e.data);\n  self.postMessage(result);\n};<\/code><\/pre>\n<p><strong>\u9002\u5408 CPU \u5bc6\u96c6\u578b\u4efb\u52a1\uff0c\u4e0d\u4f1a\u963b\u585e\u4e3b\u7ebf\u7a0b\u3002<\/strong><\/p>\n<h2>7. \u6a21\u5757\u5316\u4e0e\u73b0\u4ee3\u8bed\u6cd5<\/h2>\n<h3>7.1. ES Modules<\/h3>\n<pre><code class=\"javascript\">\/\/ math.js\nexport function add(a, b) {\n  return a + b;\n}\n\nexport default function multiply(a, b) {\n  return a * b;\n}\n\n\/\/ main.js\nimport multiply, { add } from &quot;.\/math.js&quot;;<\/code><\/pre>\n<p><strong>ES Modules \u662f\u9759\u6001\u7684\uff0c\u652f\u6301 Tree Shaking\uff0c\u80fd\u51cf\u5c0f\u6253\u5305\u4f53\u79ef\u3002<\/strong><\/p>\n<h3>7.2. IIFE &#038; Namespaces<\/h3>\n<p>\u5728\u6a21\u5757\u5316\u4e4b\u524d\uff0c\u7528 IIFE \u907f\u514d\u5168\u5c40\u6c61\u67d3\uff1a<\/p>\n<pre><code class=\"javascript\">(function() {\n  const privateVar = &quot;\u79c1\u6709\u53d8\u91cf&quot;;\n  window.MyModule = {\n    publicMethod() {\n      console.log(privateVar);\n    }\n  };\n})();<\/code><\/pre>\n<h3>7.3. Modern JS Syntax (ES6+)<\/h3>\n<ul>\n<li><strong>\u89e3\u6784\u8d4b\u503c<\/strong>\uff1a<code>const { name, age } = user;<\/code><\/li>\n<li><strong>\u5c55\u5f00\u8fd0\u7b97\u7b26<\/strong>\uff1a<code>const newArr = [...arr, 4, 5];<\/code><\/li>\n<li><strong>\u7bad\u5934\u51fd\u6570<\/strong>\uff1a<code>const add = (a, b) =&gt; a + b;<\/code><\/li>\n<li><strong>\u6a21\u677f\u5b57\u7b26\u4e32<\/strong>\uff1a<code> const msg = `Hello, ${name}`; <\/code><\/li>\n<li><strong>\u53ef\u9009\u94fe<\/strong>\uff1a<code>user?.address?.city<\/code><\/li>\n<li><strong>\u7a7a\u503c\u5408\u5e76<\/strong>\uff1a<code>const value = input ?? &quot;default&quot;;<\/code><\/li>\n<\/ul>\n<h2>8. \u5de5\u7a0b\u5316\u4e0e\u6700\u4f73\u5b9e\u8df5<\/h2>\n<h3>8.1. \u6b63\u5219\u8868\u8fbe\u5f0f (Regular Expressions)<\/h3>\n<pre><code class=\"javascript\">const emailRegex = \/^[^\/s@]+@[^\/s@]+\/.[^\/s@]+$\/;\nemailRegex.test(&quot;hello@example.com&quot;); \/\/ true<\/code><\/pre>\n<h3>8.2. \u9519\u8bef\u5904\u7406 (Error Handling)<\/h3>\n<pre><code class=\"javascript\">try {\n  riskyOperation();\n} catch (err) {\n  console.error(&quot;Error:&quot;, err.message);\n} finally {\n  cleanup(); \/\/ \u65e0\u8bba\u5982\u4f55\u90fd\u4f1a\u6267\u884c\n}<\/code><\/pre>\n<h3>8.3. \u6570\u636e\u7ed3\u6784 (Data Structures)<\/h3>\n<p>JavaScript \u5185\u7f6e\uff1a<strong>Array\u3001Object\u3001Map\u3001Set\u3001WeakMap\u3001WeakSet<\/strong>\u3002<\/p>\n<pre><code class=\"javascript\">\/\/ Map:\u952e\u53ef\u4ee5\u662f\u4efb\u610f\u7c7b\u578b\nconst map = new Map();\nmap.set({ id: 1 }, &quot;value&quot;);\n\n\/\/ Set:\u81ea\u52a8\u53bb\u91cd\nconst set = new Set([1, 2, 2, 3]); \/\/ Set {1, 2, 3}<\/code><\/pre>\n<h3>8.4. \u7b97\u6cd5\u4e0e Big O (Algorithms &#038; Big O)<\/h3>\n<p>\u65f6\u95f4\u590d\u6742\u5ea6\uff1a<\/p>\n<ul>\n<li><strong>O(1)<\/strong>\uff1a\u5e38\u6570\u65f6\u95f4\uff0c\u5982\u6570\u7ec4\u8bbf\u95ee <code>arr[0]<\/code><\/li>\n<li><strong>O(n)<\/strong>\uff1a\u7ebf\u6027\u65f6\u95f4\uff0c\u5982\u6570\u7ec4\u904d\u5386<\/li>\n<li><strong>O(n\u00b2)<\/strong>\uff1a\u5e73\u65b9\u65f6\u95f4\uff0c\u5982\u53cc\u5c42\u5faa\u73af<\/li>\n<li><strong>O(log n)<\/strong>\uff1a\u5bf9\u6570\u65f6\u95f4\uff0c\u5982\u4e8c\u5206\u67e5\u627e<\/li>\n<\/ul>\n<p><strong>\u5199\u4ee3\u7801\u524d\u5148\u60f3\u590d\u6742\u5ea6\uff0c\u907f\u514d\u6027\u80fd\u707e\u96be\u3002<\/strong><\/p>\n<h3>8.5. \u8bbe\u8ba1\u6a21\u5f0f (Design Patterns)<\/h3>\n<p>\u5e38\u7528\u6a21\u5f0f\uff1a<\/p>\n<ul>\n<li><strong>\u5355\u4f8b\u6a21\u5f0f<\/strong>\uff1a\u5168\u5c40\u53ea\u6709\u4e00\u4e2a\u5b9e\u4f8b<\/li>\n<li><strong>\u5de5\u5382\u6a21\u5f0f<\/strong>\uff1a\u7528\u51fd\u6570\u521b\u5efa\u5bf9\u8c61<\/li>\n<li><strong>\u89c2\u5bdf\u8005\u6a21\u5f0f<\/strong>\uff1a\u53d1\u5e03-\u8ba2\u9605\uff0c\u5982 EventEmitter<\/li>\n<li><strong>\u4ee3\u7406\u6a21\u5f0f<\/strong>\uff1a\u62e6\u622a\u5bf9\u8c61\u64cd\u4f5c\uff0c\u5982 Vue 3 \u7684\u54cd\u5e94\u5f0f<\/li>\n<\/ul>\n<h3>8.6. \u6574\u6d01\u4ee3\u7801 (Clean Code)<\/h3>\n<ul>\n<li>\u6709\u610f\u4e49\u7684\u547d\u540d<\/li>\n<li>\u51fd\u6570\u53ea\u505a\u4e00\u4ef6\u4e8b<\/li>\n<li>\u907f\u514d\u6df1\u5c42\u5d4c\u5957<\/li>\n<li>DRY (Don&#8217;t Repeat Yourself)<\/li>\n<\/ul>\n<h3>8.7. JavaScript \u5f15\u64ce (JavaScript Engines)<\/h3>\n<p>V8 \u5f15\u64ce\u7684\u4f18\u5316\uff1a<\/p>\n<ul>\n<li><strong>JIT \u7f16\u8bd1<\/strong>\uff1a\u70ed\u4ee3\u7801\u7f16\u8bd1\u6210\u673a\u5668\u7801<\/li>\n<li><strong>\u9690\u85cf\u7c7b<\/strong>\uff1a\u5bf9\u8c61\u7ed3\u6784\u76f8\u540c\u65f6\u5171\u4eab\u7c7b<\/li>\n<li><strong>\u5185\u8054\u7f13\u5b58<\/strong>\uff1a\u7f13\u5b58\u5c5e\u6027\u8bbf\u95ee\u8def\u5f84<\/li>\n<\/ul>\n<p><strong>\u5199\u201c\u5f15\u64ce\u53cb\u597d\u201d\u7684\u4ee3\u7801\uff1a\u4fdd\u6301\u5bf9\u8c61\u7ed3\u6784\u7a33\u5b9a\u3001\u907f\u514d\u52a8\u6001\u6dfb\u52a0\u5c5e\u6027\u3002<\/strong><\/p>\n<h2>\u603b\u7ed3<\/h2>\n<p>\u8fd9 33 \u4e2a\u6982\u5ff5\u6784\u6210\u4e86 JavaScript \u7684\u5b8c\u6574\u77e5\u8bc6\u4f53\u7cfb\uff1a<\/p>\n<ul>\n<li><strong>\u7c7b\u578b\u7cfb\u7edf<\/strong> \u662f\u5730\u57fa\uff0c\u7406\u89e3\u503c\u548c\u5f15\u7528\u7684\u533a\u522b<\/li>\n<li><strong>\u4f5c\u7528\u57df\u4e0e\u6267\u884c\u673a\u5236<\/strong> \u662f\u8fd0\u884c\u65f6\uff0c\u638c\u63e1\u95ed\u5305\u548c this<\/li>\n<li><strong>\u9762\u5411\u5bf9\u8c61<\/strong> \u662f\u539f\u578b\u94fe\uff0c\u7406\u89e3\u7ee7\u627f\u672c\u8d28<\/li>\n<li><strong>\u51fd\u6570\u5f0f\u7f16\u7a0b<\/strong> \u662f\u53e6\u4e00\u9762\uff0c\u5199\u51fa\u4f18\u96c5\u7684\u4ee3\u7801<\/li>\n<li><strong>\u5f02\u6b65\u7f16\u7a0b<\/strong> \u662f\u7cbe\u9ad3\uff0cEvent Loop \u662f\u6838\u5fc3<\/li>\n<li><strong>\u6d4f\u89c8\u5668\u4e0e Web API<\/strong> \u662f\u5b9e\u6218\uff0cDOM \u548c Fetch \u662f\u57fa\u7840<\/li>\n<li><strong>\u6a21\u5757\u5316\u4e0e\u73b0\u4ee3\u8bed\u6cd5<\/strong> \u662f\u8d8b\u52bf\uff0cES6+ \u662f\u6807\u914d<\/li>\n<li><strong>\u5de5\u7a0b\u5316\u4e0e\u6700\u4f73\u5b9e\u8df5<\/strong> \u662f\u8fdb\u9636\uff0c\u8bbe\u8ba1\u6a21\u5f0f\u548c\u6027\u80fd\u4f18\u5316\u662f\u5206\u6c34\u5cad<\/li>\n<\/ul>\n<p><strong>\u5982\u679c\u4f60\u80fd\u628a\u8fd9 33 \u4e2a\u6982\u5ff5\u90fd\u5403\u900f\uff0c\u4f60\u5c31\u771f\u7684\u61c2 JavaScript \u4e86\u3002<\/strong><\/p>\n<p>\u4e0d\u662f\u8bf4\u4f60\u8981\u628a\u6bcf\u4e2a\u6982\u5ff5\u90fd\u7814\u7a76\u5230\u5e95\u5c42\u5b9e\u73b0\uff0c\u800c\u662f\uff1a<strong>\u77e5\u9053\u5b83\u4eec\u662f\u4ec0\u4e48\u3001\u4e3a\u4ec0\u4e48\u9700\u8981\u5b83\u4eec\u3001\u4ec0\u4e48\u65f6\u5019\u7528\u3001\u600e\u4e48\u7528\u3001\u6709\u4ec0\u4e48\u5751\u3002<\/strong><\/p>\n<p>JavaScript \u770b\u8d77\u6765\u7b80\u5355\uff0c\u4f46\u8981\u5199\u597d\u5f88\u96be\u3002\u8fd9 33 \u4e2a\u6982\u5ff5\uff0c\u5c31\u662f\u4ece\u201c\u4f1a\u5199\u201d\u5230\u201c\u5199\u597d\u201d\u7684\u5fc5\u7ecf\u4e4b\u8def\u3002<\/p>\n<p>\u6211\u662f\u51b4\u7fbd\uff0c10 \u5e74\u7b14\u8015\u4e0d\u8f8d\uff0c\u4e13\u6ce8\u524d\u7aef\u9886\u57df\uff0c\u66f4\u65b0\u4e86 10+ \u7cfb\u5217\u3001300+ \u7bc7\u539f\u521b\u6280\u672f\u6587\u7ae0\uff0c\u7ffb\u8bd1\u8fc7 Svelte\u3001Solid.js\u3001TypeScript \u6587\u6863\uff0c\u8457\u6709\u5c0f\u518c\u300aNext.js \u5f00\u53d1\u6307\u5357\u300b\u3001\u300aSvelte \u5f00\u53d1\u6307\u5357\u300b\u3001\u300aAstro \u5b9e\u6218\u6307\u5357\u300b\u3002<\/p>\n<p>\u6b22\u8fce\u56f4\u89c2\u6211\u7684\u201c<a href=\"https:\/\/link.segmentfault.com\/?enc=KEErywSK3iu7CP%2BIlbc7Yw%3D%3D.etJXjtCraBK1ixjdxLXIXL12o7A6g8tN0Sz0%2BloA%2Fzs%3D\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">\u7f51\u9875\u7248\u670b\u53cb\u5708<\/a>\u201d\uff0c\u5173\u6ce8\u6211\u7684\u516c\u4f17\u53f7\uff1a<strong>\u51b4\u7fbd\uff08\u6216\u641c\u7d22 yayujs\uff09<\/strong>\uff0c\u6bcf\u5929\u5206\u4eab\u524d\u7aef\u77e5\u8bc6\u3001AI \u7f16\u7a0b\u5e72\u8d27\u3002<\/p>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000047781349\">https:\/\/segmentfault.com\/a\/1190000047781349<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f60\u597d\uff0c\u6211\u662f\u51b4\u7fbd\u3002 AI \u65f6\u4ee3\uff0c\u5f88\u591a\u540c\u5b66\u5f88\u8ff7\u832b\u3002 \u65e2\u60f3\u592f\u5b9e\u57fa\u7840\uff0c\u53c8\u8981\u8ddf\u8fdb AI\uff0c\u4e8e\u662f\u5b66\u8fd9\u5b66\u90a3\uff0c\u6c89\u4e0d\u4e0b\u5fc3\u6765\uff0c\u7ed3\u679c\u4e09 [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-10021367","post","type-post","status-publish","format-standard","hentry","category-share"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10021367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10021367"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10021367\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10021367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10021367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10021367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}