{"id":583,"date":"2025-12-07T10:05:51","date_gmt":"2025-12-07T02:05:51","guid":{"rendered":"https:\/\/www.52runoob.com\/?p=583"},"modified":"2025-12-07T10:05:51","modified_gmt":"2025-12-07T02:05:51","slug":"javascript%e4%b8%adundefined%e7%9a%84%e6%ad%a3%e7%a1%ae%e6%89%93%e5%bc%80%e6%96%b9%e5%bc%8f%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/www.52runoob.com\/index.php\/2025\/12\/07\/javascript%e4%b8%adundefined%e7%9a%84%e6%ad%a3%e7%a1%ae%e6%89%93%e5%bc%80%e6%96%b9%e5%bc%8f%e8%af%a6%e8%a7%a3\/","title":{"rendered":"JavaScript\u4e2dundefined\u7684\u6b63\u786e\u6253\u5f00\u65b9\u5f0f\u8be6\u89e3"},"content":{"rendered":"\n<p>\u4e0b\u9762\u7ed9\u4f60\u4e00\u4efd <strong>\u300aJavaScript \u4e2d undefined \u7684\u6b63\u786e\u6253\u5f00\u65b9\u5f0f\u8be6\u89e3\uff082025 \u6700\u5168\u603b\u7ed3\u7248\uff09\u300b<\/strong>\uff0c\u5185\u5bb9\u6e05\u6670\u3001\u6709\u4f8b\u5b50\u3001\u6709\u5751\u70b9\uff0c\u662f\u975e\u5e38\u9002\u5408\u505a\u5b66\u4e60\u7b14\u8bb0\u6216\u535a\u5ba2\u6587\u7ae0\u7684\u5b8c\u6574\u7248\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83e\udde9 \u4e00\u6587\u5f7b\u5e95\u641e\u61c2 JavaScript \u4e2d\u7684 <code>undefined<\/code><\/h1>\n\n\n\n<p>\u5728 JS \u4e2d\uff0c<code>undefined<\/code> \u662f\u51fa\u73b0\u9891\u7387\u6700\u9ad8\u4f46\u4e5f\u6700\u5bb9\u6613\u88ab\u8bef\u89e3\u7684\u6982\u5ff5\u4e4b\u4e00\uff0c\u5b83\u65e2\u662f<strong>\u7c7b\u578b<\/strong>\u4e5f\u662f<strong>\u503c<\/strong>\uff0c\u4e5f\u662f\u65e0\u6570 Bug \u7684\u6765\u6e90\u3002<\/p>\n\n\n\n<p>\u672c\u6587\u4ece\u57fa\u7840 \u2192 \u539f\u7406 \u2192 \u573a\u666f \u2192 \u5b9e\u6218 \u2192 \u5751\u70b9 \u2192 \u6700\u4f73\u5b9e\u8df5\uff0c\u5168\u65b9\u9762\u8bb2\u6e05\u695a\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\udccc 1. <code>undefined<\/code> \u662f\u4ec0\u4e48\uff1f<\/h1>\n\n\n\n<p>\u5728 JavaScript \u4e2d\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>undefined<\/code> \u662f\u4e00\u4e2a\u539f\u59cb\u7c7b\u578b\uff08primitive type\uff09<\/strong><\/li>\n\n\n\n<li><strong>\u5176\u552f\u4e00\u7684\u503c\u4e5f\u53eb <code>undefined<\/code><\/strong><\/li>\n<\/ul>\n\n\n\n<p>\u5373\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ntypeof undefined === &quot;undefined&quot;; \/\/ true\n\n<\/pre><\/div>\n\n\n<p>\u5b83\u8868\u793a\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u4e00\u4e2a\u53d8\u91cf <strong>\u5df2\u58f0\u660e\u4f46\u672a\u8d4b\u503c<\/strong>\u3002<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\udccc 2. \u54ea\u4e9b\u60c5\u51b5\u4f1a\u51fa\u73b0 <code>undefined<\/code><\/h1>\n\n\n\n<p>\u4e0b\u9762\u662f\u6700\u5e38\u89c1\u7684 <strong>\u516d\u79cd\u60c5\u51b5<\/strong>\uff1a<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2714 2.1 \u53d8\u91cf\u58f0\u660e\u4f46\u672a\u8d4b\u503c<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nlet a;\nconsole.log(a);  \/\/ undefined\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2714 2.2 \u8bbf\u95ee\u5bf9\u8c61\u4e2d\u4e0d\u5b58\u5728\u7684\u5c5e\u6027<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nconst obj = {};\nconsole.log(obj.name); \/\/ undefined\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2714 2.3 \u51fd\u6570\u6ca1\u6709 return\uff0c\u9ed8\u8ba4\u8fd4\u56de undefined<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nfunction foo() {}\nconsole.log(foo()); \/\/ undefined\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2714 2.4 \u8c03\u7528\u51fd\u6570\u65f6\u53c2\u6570\u7f3a\u5931<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nfunction sum(a, b) {\n  console.log(b); \/\/ undefined\n}\nsum(1);\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2714 2.5 \u8bfb\u53d6\u6570\u7ec4\u8d8a\u754c<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nconst arr = &#x5B;10, 20];\nconsole.log(arr&#x5B;5]); \/\/ undefined\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2714 2.6 void \u8fd0\u7b97\u7b26\u56fa\u5b9a\u8fd4\u56de undefined<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nconsole.log(void 0);        \/\/ undefined\nconsole.log(void (1 + 2));  \/\/ undefined\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\udccc 3. <code>undefined<\/code> \u4e0e <code>null<\/code> \u7684\u533a\u522b\uff08\u9762\u8bd5\u5e38\u8003\uff09<\/h1>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u9879\u76ee<\/th><th>undefined<\/th><th>null<\/th><\/tr><\/thead><tbody><tr><td>\u7c7b\u578b<\/td><td>undefined<\/td><td>object\uff08\u5386\u53f2\u9057\u7559 bug\uff09<\/td><\/tr><tr><td>\u8868\u793a<\/td><td>\u672a\u8d4b\u503c<\/td><td>\u8d4b\u503c\u4e3a\u7a7a<\/td><\/tr><tr><td>\u6765\u6e90<\/td><td>JS \u5185\u90e8\u81ea\u52a8\u51fa\u73b0<\/td><td>\u9700\u8981\u5f00\u53d1\u8005\u660e\u786e\u8d4b\u503c<\/td><\/tr><tr><td>JSON\u8f6c\u6362<\/td><td>\u4f1a\u88ab\u5ffd\u7565<\/td><td>\u4f1a\u53d8\u6210 null<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u4e00\u53e5\u8bdd\u8bb0\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>undefined = \u7f3a\u5931<br>null = \u201c\u6ca1\u6709\u503c\u201d\uff0c\u662f\u4f60\u4e3b\u52a8\u7ed9\u7684<\/strong><\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\udccc 4. <code>undefined<\/code> \u7684\u9519\u8bef\u4f7f\u7528\u65b9\u5f0f\uff08\u8e29\u5751\u8b66\u544a \u26a0\ufe0f\uff09<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u274c 4.1 \u4e0d\u8981\u624b\u52a8\u5199 <code>undefined<\/code><\/h2>\n\n\n\n<p>\u4f60\u5b8c\u5168\u53ef\u4ee5\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nlet x = undefined;    \/\/ \u274c \u4e0d\u8981\u8fd9\u6837\u5199\uff01\n\n<\/pre><\/div>\n\n\n<p>\u5b9e\u9645\u63a8\u8350\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nlet x;                \/\/ \u2714 \u81ea\u52a8\u5c31\u662f undefined\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u274c 4.2 \u65e9\u671f undefined \u53ef\u4ee5\u88ab\u7be1\u6539\uff08\u73b0\u5728\u4e0d\u4f1a\uff09<\/h2>\n\n\n\n<p>\u65e9\u671f\u6d4f\u89c8\u5668\u5141\u8bb8\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nundefined = 123;\n\n<\/pre><\/div>\n\n\n<p>\u4e3a\u4e86\u907f\u514d\u98ce\u9669\uff0c\u7ecf\u5178\u5199\u6cd5\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n(function(undefined) {\n  \/\/ inside: undefined is safe\n})();\n\n<\/pre><\/div>\n\n\n<p>\u73b0\u5728 ES5+ \u7684\u6240\u6709\u73b0\u4ee3\u73af\u5883\u5df2\u7981\u6b62\u4fee\u6539 <code>undefined<\/code>\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\udccc 5. \u5224\u65ad undefined \u7684\u6b63\u786e\u65b9\u5f0f\uff08\u6700\u4f73\u5b9e\u8df5\uff09<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2714 \u63a8\u8350 5.1\uff1a\u4f7f\u7528\u4e25\u683c\u76f8\u7b49<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nif (x === undefined) {}\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2714 \u63a8\u8350 5.2\uff1a\u4f7f\u7528 typeof\uff08\u907f\u514d\u53d8\u91cf\u672a\u58f0\u660e\u62a5\u9519\uff09<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nif (typeof x === &quot;undefined&quot;) {}\n\n<\/pre><\/div>\n\n\n<p>\u4f18\u70b9\uff1a<strong>\u5373\u4f7f x \u6ca1\u6709\u58f0\u660e\u4e5f\u4e0d\u4f1a\u62a5\u9519<\/strong>\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2714 \u63a8\u8350 5.3\uff1a\u4f7f\u7528 null \u5408\u5e76\u64cd\u4f5c\u7b26\uff08ES2020+\uff09<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nlet value = input ?? &quot;default&quot;;\n\n<\/pre><\/div>\n\n\n<p>\u5b83\u4f1a\u5728 <code>null<\/code> \u548c <code>undefined<\/code> \u65f6\u53d6\u9ed8\u8ba4\u503c\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\udccc 6. <code>undefined<\/code> \u7684\u5e38\u89c1\u9677\u9631<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u26a0 6.1 \u5bf9\u8c61\u6df1\u5c42\u5c5e\u6027\u5bb9\u6613\u62a5\u9519<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nconsole.log(user.info.address.city); \n\/\/ TypeError: Cannot read property \u2018address\u2019 of undefined\n\n<\/pre><\/div>\n\n\n<p>\u89e3\u51b3 \u2192 \u53ef\u9009\u94fe\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nconsole.log(user?.info?.address?.city);\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u26a0 6.2 undefined \u4f1a\u88ab JSON.stringify \u5ffd\u7565<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nJSON.stringify({ x: undefined });\n\/\/ &quot;{}&quot;\n\n<\/pre><\/div>\n\n\n<p>\u5728\u6570\u7ec4\u4e2d\u4f1a\u53d8\u4e3a null\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nJSON.stringify(&#x5B;1, undefined, 3]);\n\/\/ &quot;&#x5B;1,null,3]&quot;\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u26a0 6.3 undefined \u4e0e null \u7684 == \u6bd4\u8f83<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nundefined == null  \/\/ true\n\n<\/pre><\/div>\n\n\n<p>\u4f46 !==\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nundefined === null \/\/ false\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\udccc 7. <code>undefined<\/code> \u7684\u6b63\u786e\u4f7f\u7528\uff08\u6700\u4f73\u5b9e\u8df5\uff09<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2714 \u573a\u666f 1\uff1a\u533a\u5206\u201c\u6ca1\u6709\u4f20\u503c\u201d\u4e0e\u201c\u4f20\u4e86 undefined\u201d<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nfunction test(a) {\n  if (a === undefined) console.log(&quot;\u53c2\u6570\u672a\u4f20&quot;);\n}\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2714 \u573a\u666f 2\uff1a\u53c2\u6570\u9ed8\u8ba4\u503c<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nfunction greet(name = &quot;Guest&quot;) {\n  console.log(name);\n}\n\ngreet();           \/\/ Guest\ngreet(undefined);  \/\/ Guest\ngreet(null);       \/\/ null\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2714 \u573a\u666f 3\uff1aAPI \u8bbe\u8ba1\u4e2d\u7528 null \u8868\u793a\u201c\u7a7a\u503c\u201d<\/h2>\n\n\n\n<p>\u4f8b\u5982\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nlet data = null; \/\/ \u540e\u7aef\u660e\u786e\u8868\u793a\u6ca1\u6709\u6570\u636e\n\n<\/pre><\/div>\n\n\n<p>\u800c\u4e0d\u662f\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nlet data = undefined; \n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\udccc 8. undefined \u7684\u9ad8\u9636\u6280\u5de7<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2b50 8.1 \u4f7f\u7528 void 0 \u4ee3\u66ff undefined\uff08\u4e0d\u63a8\u8350\u4f46\u4f60\u53ef\u80fd\u4f1a\u89c1\u5230\uff09<\/h2>\n\n\n\n<p>\u56e0\u4e3a <code>void 0<\/code> \u6c38\u8fdc\u8fd4\u56de undefined\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nconst u = void 0;   \/\/ \u6c38\u8fdc\u662f undefined\n\n<\/pre><\/div>\n\n\n<p>\u67d0\u4e9b\u8001\u4ee3\u7801\u8fd9\u6837\u5199\u662f\u4e3a\u4e86\u9632\u6b62 undefined \u88ab\u4fee\u6539\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2b50 8.2 \u5224\u65ad\u53d8\u91cf\u662f\u5426\u5b9a\u4e49\u4f46\u672a\u58f0\u660e<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nif (typeof someVar === &quot;undefined&quot;) {\n  console.log(&quot;someVar \u672a\u58f0\u660e\u6216\u672a\u5b9a\u4e49&quot;);\n}\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83c\udfaf 9. \u6700\u7ec8\u603b\u7ed3\uff08\u6700\u7b80\u7248\uff09<\/h1>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>undefined<\/code> \u662f\u7c7b\u578b\u4e5f\u662f\u503c<\/li>\n\n\n\n<li>\u8868\u793a\u201c\u53d8\u91cf\u5df2\u58f0\u660e\u4f46\u672a\u8d4b\u503c\u201d<\/li>\n\n\n\n<li>\u81ea\u52a8\u51fa\u73b0\uff1a\u5bf9\u8c61\u4e0d\u5b58\u5728\u5c5e\u6027\u3001\u51fd\u6570\u65e0\u8fd4\u56de\u503c\u3001\u53c2\u6570\u7f3a\u5931\u7b49<\/li>\n\n\n\n<li>\u4f7f\u7528 <code>typeof<\/code> \u5224\u65ad\u6700\u5b89\u5168<\/li>\n\n\n\n<li>JSON \u4f1a\u5ffd\u7565 undefined<\/li>\n\n\n\n<li>\u53ef\u9009\u94fe <code>?.<\/code> \u80fd\u907f\u514d undefined \u62a5\u9519<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0b\u9762\u7ed9\u4f60\u4e00\u4efd \u300aJavaScript \u4e2d undefined \u7684\u6b63\u786e\u6253\u5f00\u65b9\u5f0f\u8be6\u89e3&#8230; <a class=\"more-link\" href=\"https:\/\/www.52runoob.com\/index.php\/2025\/12\/07\/javascript%e4%b8%adundefined%e7%9a%84%e6%ad%a3%e7%a1%ae%e6%89%93%e5%bc%80%e6%96%b9%e5%bc%8f%e8%af%a6%e8%a7%a3\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[],"class_list":["post-583","post","type-post","status-publish","format-standard","hentry","category-javascript"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/583","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/comments?post=583"}],"version-history":[{"count":1,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/583\/revisions"}],"predecessor-version":[{"id":584,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/583\/revisions\/584"}],"wp:attachment":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/media?parent=583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/categories?post=583"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/tags?post=583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}