{"id":100598,"date":"2026-09-04T21:18:11","date_gmt":"2026-09-04T13:18:11","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/100598.html"},"modified":"2026-09-04T21:18:11","modified_gmt":"2026-09-04T13:18:11","slug":"%e5%89%8d%e7%ab%af%e5%9f%ba%e7%a1%80-javascript%ef%bc%88%e5%9f%ba%e7%a1%80%e8%af%ad%e6%b3%95%ef%bc%89%ef%bc%88%e4%b8%8a%e7%af%87%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/100598.html","title":{"rendered":"\u524d\u7aef\u57fa\u7840\u2014\u2014JavaScript\uff08\u57fa\u7840\u8bed\u6cd5\uff09\uff08\u4e0a\u7bc7\uff09"},"content":{"rendered":"<p id=\"main-toc\">\u76ee\u5f55<\/p>\n<p id=\"%E5%88%9D%E8%AF%86JavaScript-toc\" style=\"margin-left:0px\">\u521d\u8bc6JavaScript<\/p>\n<p id=\"JavaScript%E6%98%AF%E4%BB%80%E4%B9%88-toc\" style=\"margin-left:40px\">JavaScript\u662f\u4ec0\u4e48<\/p>\n<p id=\"%E5%8F%91%E5%B1%95%E5%8E%86%E5%8F%B2-toc\" style=\"margin-left:40px\">\u53d1\u5c55\u5386\u53f2<\/p>\n<p id=\"JavaScript%E5%92%8CHTML%E5%92%8CCSS%E4%B9%8B%E9%97%B4%E7%9A%84%E5%85%B3%E7%B3%BB-toc\" style=\"margin-left:40px\">JavaScript\u548cHTML\u548cCSS\u4e4b\u95f4\u7684\u5173\u7cfb<\/p>\n<p id=\"JavaScript%E8%BF%90%E8%A1%8C%E8%BF%87%E7%A8%8B-toc\" style=\"margin-left:40px\">JavaScript\u8fd0\u884c\u8fc7\u7a0b<\/p>\n<p id=\"JavaScript%E7%9A%84%E7%BB%84%E6%88%90-toc\" style=\"margin-left:40px\">JavaScript\u7684\u7ec4\u6210<\/p>\n<p id=\"%E9%87%8D%E8%A6%81%E6%A6%82%E5%BF%B5%3A%20ECMAScript-toc\" style=\"margin-left:80px\">\u91cd\u8981\u6982\u5ff5: ECMAScript<\/p>\n<p id=\"%E5%89%8D%E7%BD%AE%E7%9F%A5%E8%AF%86-toc\" style=\"margin-left:0px\">\u524d\u7f6e\u77e5\u8bc6<\/p>\n<p id=\"%E7%AC%AC%E4%B8%80%E4%B8%AA%E7%A8%8B%E5%BA%8F-toc\" style=\"margin-left:40px\">\u7b2c\u4e00\u4e2a\u7a0b\u5e8f<\/p>\n<p id=\"JavaScript%E7%9A%84%E4%B9%A6%E5%86%99%E5%BD%A2%E5%BC%8F-toc\" style=\"margin-left:40px\">JavaScript\u7684\u4e66\u5199\u5f62\u5f0f<\/p>\n<p id=\"%E8%A1%8C%E5%86%85%E5%BC%8F-toc\" style=\"margin-left:80px\">\u884c\u5185\u5f0f<\/p>\n<p id=\"%E5%86%85%E5%B5%8C%E5%BC%8F-toc\" style=\"margin-left:80px\">\u5185\u5d4c\u5f0f<\/p>\n<p id=\"%E5%A4%96%E9%83%A8%E5%BC%8F-toc\" style=\"margin-left:80px\">\u5916\u90e8\u5f0f<\/p>\n<p id=\"%E6%B3%A8%E9%87%8A-toc\" style=\"margin-left:80px\">\u6ce8\u91ca<\/p>\n<p id=\"%E8%BE%93%E5%85%A5%E8%BE%93%E5%87%BA-toc\" style=\"margin-left:40px\">\u8f93\u5165\u8f93\u51fa<\/p>\n<p id=\"%E8%BE%93%E5%85%A5%EF%BC%9Aprompt-toc\" style=\"margin-left:80px\">\u8f93\u5165&#xff1a;prompt<\/p>\n<p id=\"%E8%BE%93%E5%87%BA%EF%BC%9Aalert-toc\" style=\"margin-left:80px\">\u8f93\u51fa&#xff1a;alert<\/p>\n<p id=\"%E8%BE%93%E5%87%BA%EF%BC%9Aconsole.log-toc\" style=\"margin-left:80px\">\u8f93\u51fa&#xff1a;console.log<\/p>\n<p id=\"%E9%87%8D%E8%A6%81%E6%A6%82%E5%BF%B5%EF%BC%9A%E6%97%A5%E5%BF%97-toc\" style=\"margin-left:80px\">\u91cd\u8981\u6982\u5ff5&#xff1a;\u65e5\u5fd7<\/p>\n<p id=\"%E9%87%8D%E8%A6%81%E6%A6%82%E5%BF%B5%EF%BC%9A-toc\" style=\"margin-left:80px\">\u91cd\u8981\u6982\u5ff5&#xff1a;<\/p>\n<p id=\"%E8%AF%AD%E6%B3%95%E6%A6%82%E8%A7%88-toc\" style=\"margin-left:0px\">\u8bed\u6cd5\u6982\u89c8<\/p>\n<p id=\"%E5%8F%98%E9%87%8F%E7%9A%84%E4%BD%BF%E7%94%A8-toc\" style=\"margin-left:40px\">\u53d8\u91cf\u7684\u4f7f\u7528<\/p>\n<p id=\"%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95-toc\" style=\"margin-left:80px\">\u57fa\u672c\u7528\u6cd5<\/p>\n<p id=\"%E4%BD%BF%E7%94%A8%E5%8F%98%E9%87%8F-toc\" style=\"margin-left:120px\">\u4f7f\u7528\u53d8\u91cf<\/p>\n<p id=\"%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B%EF%BC%9A%E5%BC%B9%E6%A1%86%E6%8F%90%E7%A4%BA%E7%94%A8%E6%88%B7%E8%BE%93%E5%85%A5%E4%BF%A1%E6%81%AF%2C%20%E5%86%8D%E5%BC%B9%E6%A1%86%E6%98%BE%E7%A4%BA-toc\" style=\"margin-left:120px\">\u4ee3\u7801\u793a\u4f8b&#xff1a;\u5f39\u6846\u63d0\u793a\u7528\u6237\u8f93\u5165\u4fe1\u606f, \u518d\u5f39\u6846\u663e\u793a<\/p>\n<p id=\"%E7%90%86%E8%A7%A3%E5%8A%A8%E6%80%81%E7%B1%BB%E5%9E%8B-toc\" style=\"margin-left:80px\">\u7406\u89e3\u52a8\u6001\u7c7b\u578b<\/p>\n<p id=\"1)%20JS%20%E7%9A%84%E5%8F%98%E9%87%8F%E7%B1%BB%E5%9E%8B%E6%98%AF%E7%A8%8B%E5%BA%8F%E8%BF%90%E8%A1%8C%E8%BF%87%E7%A8%8B%E4%B8%AD%E6%89%8D%E7%A1%AE%E5%AE%9A%E7%9A%84(%E8%BF%90%E8%A1%8C%E5%88%B0%20%3D%20%E8%AF%AD%E5%8F%A5%E6%89%8D%E4%BC%9A%E7%A1%AE%E5%AE%9A%E7%B1%BB%E5%9E%8B)-toc\" style=\"margin-left:120px\">1) JS \u7684\u53d8\u91cf\u7c7b\u578b\u662f\u7a0b\u5e8f\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u624d\u786e\u5b9a\u7684(\u8fd0\u884c\u5230 &#061; \u8bed\u53e5\u624d\u4f1a\u786e\u5b9a\u7c7b\u578b)<\/p>\n<p id=\"2)%20%E9%9A%8F%E7%9D%80%E7%A8%8B%E5%BA%8F%E8%BF%90%E8%A1%8C%2C%20%E5%8F%98%E9%87%8F%E7%9A%84%E7%B1%BB%E5%9E%8B%E5%8F%AF%E8%83%BD%E4%BC%9A%E5%8F%91%E7%94%9F%E6%94%B9%E5%8F%98.-toc\" style=\"margin-left:120px\">2) \u968f\u7740\u7a0b\u5e8f\u8fd0\u884c, \u53d8\u91cf\u7684\u7c7b\u578b\u53ef\u80fd\u4f1a\u53d1\u751f\u6539\u53d8.<\/p>\n<p id=\"%E5%9F%BA%E6%9C%AC%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B-toc\" style=\"margin-left:40px\">\u57fa\u672c\u6570\u636e\u7c7b\u578b<\/p>\n<p id=\"number%E6%95%B0%E5%AD%97%E7%B1%BB%E5%9E%8B-toc\" style=\"margin-left:80px\">number\u6570\u5b57\u7c7b\u578b<\/p>\n<p id=\"%E6%95%B0%E5%AD%97%E8%BF%9B%E5%88%B6%E8%A1%A8%E7%A4%BA-toc\" style=\"margin-left:80px\">\u6570\u5b57\u8fdb\u5236\u8868\u793a<\/p>\n<p id=\"%E7%89%B9%E6%AE%8A%E7%9A%84%E6%95%B0%E5%AD%97%E5%80%BC-toc\" style=\"margin-left:80px\">\u7279\u6b8a\u7684\u6570\u5b57\u503c<\/p>\n<p id=\"string%E5%AD%97%E7%AC%A6%E4%B8%B2%E7%B1%BB%E5%9E%8B-toc\" style=\"margin-left:80px\">string\u5b57\u7b26\u4e32\u7c7b\u578b<\/p>\n<p id=\"%E5%9F%BA%E6%9C%AC%E8%A7%84%E5%88%99-toc\" style=\"margin-left:120px\">\u57fa\u672c\u89c4\u5219<\/p>\n<p id=\"%E8%BD%AC%E4%B9%89%E5%AD%97%E7%AC%A6-toc\" style=\"margin-left:120px\">\u8f6c\u4e49\u5b57\u7b26<\/p>\n<p id=\"%E6%B1%82%E9%95%BF%E5%BA%A6-toc\" style=\"margin-left:120px\">\u6c42\u957f\u5ea6<\/p>\n<p id=\"%E5%AD%97%E7%AC%A6%E4%B8%B2%E6%8B%BC%E6%8E%A5-toc\" style=\"margin-left:120px\">\u5b57\u7b26\u4e32\u62fc\u63a5<\/p>\n<p id=\"boolean%E5%B8%83%E5%B0%94%E7%B1%BB%E5%9E%8B-toc\" style=\"margin-left:80px\">boolean\u5e03\u5c14\u7c7b\u578b<\/p>\n<p id=\"undefined%E6%9C%AA%E5%AE%9A%E4%B9%89%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B-toc\" style=\"margin-left:80px\">undefined\u672a\u5b9a\u4e49\u6570\u636e\u7c7b\u578b<\/p>\n<p id=\"null%E7%A9%BA%E5%80%BC%E7%B1%BB%E5%9E%8B-toc\" style=\"margin-left:80px\">null\u7a7a\u503c\u7c7b\u578b<\/p>\n<p id=\"%E8%BF%90%E7%AE%97%E7%AC%A6-toc\" style=\"margin-left:40px\">\u8fd0\u7b97\u7b26<\/p>\n<p id=\"%E7%AE%97%E6%9C%AF%E8%BF%90%E7%AE%97%E7%AC%A6-toc\" style=\"margin-left:80px\">\u7b97\u672f\u8fd0\u7b97\u7b26<\/p>\n<p id=\"%E8%B5%8B%E5%80%BC%E8%BF%90%E7%AE%97%E7%AC%A6%26%E5%A4%8D%E5%90%88%E8%B5%8B%E5%80%BC%E8%BF%90%E7%AE%97%E7%AC%A6-toc\" style=\"margin-left:80px\">\u8d4b\u503c\u8fd0\u7b97\u7b26&amp;\u590d\u5408\u8d4b\u503c\u8fd0\u7b97\u7b26<\/p>\n<p id=\"%E8%87%AA%E5%A2%9E%E8%87%AA%E5%87%8F%E8%BF%90%E7%AE%97%E7%AC%A6-toc\" style=\"margin-left:80px\">\u81ea\u589e\u81ea\u51cf\u8fd0\u7b97\u7b26<\/p>\n<p id=\"%E6%AF%94%E8%BE%83%E8%BF%90%E7%AE%97%E7%AC%A6-toc\" style=\"margin-left:80px\">\u6bd4\u8f83\u8fd0\u7b97\u7b26<\/p>\n<p id=\"%E9%80%BB%E8%BE%91%E8%BF%90%E7%AE%97%E7%AC%A6-toc\" style=\"margin-left:80px\">\u903b\u8f91\u8fd0\u7b97\u7b26<\/p>\n<p id=\"%E4%BD%8D%E8%BF%90%E7%AE%97-toc\" style=\"margin-left:80px\">\u4f4d\u8fd0\u7b97<\/p>\n<p id=\"%E7%A7%BB%E4%BD%8D%E8%BF%90%E7%AE%97-toc\" style=\"margin-left:80px\">\u79fb\u4f4d\u8fd0\u7b97<\/p>\n<p id=\"%E6%9D%A1%E4%BB%B6%E8%AF%AD%E5%8F%A5-toc\" style=\"margin-left:40px\">\u6761\u4ef6\u8bed\u53e5<\/p>\n<p id=\"if%E8%AF%AD%E5%8F%A5-toc\" style=\"margin-left:80px\">if\u8bed\u53e5<\/p>\n<p id=\"%E5%9F%BA%E6%9C%AC%E8%AF%AD%E6%B3%95%E6%A0%BC%E5%BC%8F-toc\" style=\"margin-left:120px\">\u57fa\u672c\u8bed\u6cd5\u683c\u5f0f<\/p>\n<p id=\"%E7%BB%83%E4%B9%A0%E6%A1%88%E4%BE%8B-toc\" style=\"margin-left:120px\">\u7ec3\u4e60\u6848\u4f8b<\/p>\n<p id=\"%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B1%EF%BC%9A%E5%88%A4%E5%AE%9A%E4%B8%80%E4%B8%AA%E6%95%B0%E5%AD%97%E6%98%AF%E5%A5%87%E6%95%B0%E8%BF%98%E6%98%AF%E5%81%B6%E6%95%B0-toc\" style=\"margin-left:120px\">\u4ee3\u7801\u793a\u4f8b1&#xff1a;\u5224\u5b9a\u4e00\u4e2a\u6570\u5b57\u662f\u5947\u6570\u8fd8\u662f\u5076\u6570<\/p>\n<p id=\"%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B2%EF%BC%9A%E5%88%A4%E5%AE%9A%E4%B8%80%E4%B8%AA%E6%95%B0%E5%AD%97%E6%98%AF%E6%AD%A3%E6%95%B0%E8%BF%98%E6%98%AF%E8%B4%9F%E6%95%B0-toc\" style=\"margin-left:120px\">\u4ee3\u7801\u793a\u4f8b2&#xff1a;\u5224\u5b9a\u4e00\u4e2a\u6570\u5b57\u662f\u6b63\u6570\u8fd8\u662f\u8d1f\u6570<\/p>\n<p id=\"%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B3%EF%BC%9A%E5%88%A4%E5%AE%9A%E6%9F%90%E4%B8%80%E5%B9%B4%E4%BB%BD%E6%98%AF%E5%90%A6%E6%98%AF%E9%97%B0%E5%B9%B4-toc\" style=\"margin-left:120px\">\u4ee3\u7801\u793a\u4f8b3&#xff1a;\u5224\u5b9a\u67d0\u4e00\u5e74\u4efd\u662f\u5426\u662f\u95f0\u5e74<\/p>\n<p id=\"%E4%B8%89%E5%85%83%E8%A1%A8%E8%BE%BE%E5%BC%8F-toc\" style=\"margin-left:80px\">\u4e09\u5143\u8868\u8fbe\u5f0f<\/p>\n<p id=\"switch-toc\" style=\"margin-left:80px\">switch<\/p>\n<p id=\"%E8%B0%83%E8%AF%95%E6%8A%80%E5%B7%A7-toc\" style=\"margin-left:120px\">\u8c03\u8bd5\u6280\u5de7<\/p>\n<p id=\"%E5%BE%AA%E7%8E%AF%E8%AF%AD%E5%8F%A5-toc\" style=\"margin-left:40px\">\u5faa\u73af\u8bed\u53e5<\/p>\n<p id=\"while%E5%BE%AA%E7%8E%AF-toc\" style=\"margin-left:80px\">while\u5faa\u73af<\/p>\n<p id=\"%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B1%EF%BC%9A%E6%89%93%E5%8D%B01-10-toc\" style=\"margin-left:120px\">\u4ee3\u7801\u793a\u4f8b1&#xff1a;\u6253\u53701-10<\/p>\n<p id=\"%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B2%EF%BC%9A%E8%AE%A1%E7%AE%975%E7%9A%84%E9%98%B6%E4%B9%98-toc\" style=\"margin-left:120px\">\u4ee3\u7801\u793a\u4f8b2&#xff1a;\u8ba1\u7b975\u7684\u9636\u4e58<\/p>\n<p id=\"continue-toc\" style=\"margin-left:80px\">continue<\/p>\n<p id=\"%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B%EF%BC%9A%E6%89%BE%E5%88%B0100-200%E4%B8%AD%E6%89%80%E6%9C%893%E7%9A%84%E5%80%8D%E6%95%B0-toc\" style=\"margin-left:120px\">\u4ee3\u7801\u793a\u4f8b&#xff1a;\u627e\u5230100-200\u4e2d\u6240\u67093\u7684\u500d\u6570<\/p>\n<p id=\"break-toc\" style=\"margin-left:80px\">break<\/p>\n<p id=\"%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B%EF%BC%9A%E6%89%BE%E5%88%B0100-200%E4%B8%AD%E7%AC%AC%E4%B8%80%E4%B8%AA3%E7%9A%84%E5%80%8D%E6%95%B0-toc\" style=\"margin-left:120px\">\u4ee3\u7801\u793a\u4f8b&#xff1a;\u627e\u5230100-200\u4e2d\u7b2c\u4e00\u4e2a3\u7684\u500d\u6570<\/p>\n<p id=\"for%E5%BE%AA%E7%8E%AF-toc\" style=\"margin-left:80px\">for\u5faa\u73af<\/p>\n<p id=\"%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B1%EF%BC%9A%E6%89%93%E5%8D%B01-10%E7%9A%84%E6%95%B0%E5%AD%97-toc\" style=\"margin-left:120px\">\u4ee3\u7801\u793a\u4f8b1&#xff1a;\u6253\u53701-10\u7684\u6570\u5b57<\/p>\n<p id=\"%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B2%EF%BC%9A%E8%AE%A1%E7%AE%975%E7%9A%84%E9%98%B6%E4%B9%98-toc\" style=\"margin-left:120px\">\u4ee3\u7801\u793a\u4f8b2&#xff1a;\u8ba1\u7b975\u7684\u9636\u4e58<\/p>\n<hr id=\"hr-toc\" \/>\n<h2 id=\"%E5%88%9D%E8%AF%86JavaScript\">\u521d\u8bc6JavaScript<\/h2>\n<h3 id=\"JavaScript%E6%98%AF%E4%BB%80%E4%B9%88\">JavaScript\u662f\u4ec0\u4e48<\/h3>\n<p>JavaScript&#xff08;\u7b80\u79f0 JS&#xff09;<\/p>\n<p>\u662f\u4e16\u754c\u4e0a\u6700\u6d41\u884c\u7684\u7f16\u7a0b\u8bed\u8a00\u4e4b\u4e00<\/p>\n<p>\u662f\u4e00\u4e2a\u811a\u672c\u8bed\u8a00&#xff0c;\u901a\u8fc7\u89e3\u91ca\u5668\u8fd0\u884c<\/p>\n<p>\u4e3b\u8981\u5728\u5ba2\u6237\u7aef&#xff08;\u6d4f\u89c8\u5668&#xff09;\u4e0a\u8fd0\u884c&#xff0c;\u73b0\u5728\u4e5f\u53ef\u4ee5\u57fa\u4e8e node.js \u5728\u670d\u52a1\u5668\u7aef\u8fd0\u884c<\/p>\n<p>JavaScript \u6700\u521d\u53ea\u662f\u4e3a\u4e86\u5b8c\u6210\u7b80\u5355\u7684\u8868\u5355\u9a8c\u8bc1&#xff08;\u9a8c\u8bc1\u6570\u636e\u5408\u6cd5\u6027&#xff09;&#xff0c;\u7ed3\u679c\u540e\u6765\u4e0d\u5c0f\u5fc3\u5c31\u706b\u4e86<\/p>\n<p>\u5f53\u524d JavaScript \u5df2\u7ecf\u6210\u4e3a\u4e86\u4e00\u4e2a\u901a\u7528\u7684\u7f16\u7a0b\u8bed\u8a00<\/p>\n<p>JavaScript \u7684\u80fd\u505a\u7684\u4e8b\u60c5:<\/p>\n<p>\u7f51\u9875\u5f00\u53d1(\u66f4\u590d\u6742\u7684\u7279\u6548\u548c\u7528\u6237\u4ea4\u4e92)<\/p>\n<p>\u7f51\u9875\u6e38\u620f\u5f00\u53d1<\/p>\n<p>\u670d\u52a1\u5668\u5f00\u53d1(node.js)<\/p>\n<p>\u684c\u9762\u7a0b\u5e8f\u5f00\u53d1(Electron, VSCode \u5c31\u662f\u8fd9\u4e48\u6765\u7684)<\/p>\n<p>\u624b\u673a app \u5f00\u53d1<\/p>\n<h3 id=\"%E5%8F%91%E5%B1%95%E5%8E%86%E5%8F%B2\">\u53d1\u5c55\u5386\u53f2<\/h3>\n<p>JavaScript \u4e4b\u7236 \u5e03\u5170\u767b * \u827e\u5947 (Brendan Eich)<\/p>\n<p>\u66fe\u7ecf\u7684\u5e03\u5170\u767b<\/p>\n<p> \u00a0 <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"315\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131802-6a9ac50aa924f.png\" width=\"247\" \/><\/p>\n<p> \u53d1\u660e JavaScript \u4e4b\u540e\u7684\u5e03\u5170\u767b <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"713\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131802-6a9ac50ac390c.png\" width=\"1274\" \/><\/p>\n<p>1995 \u5e74, \u7528 10 \u5929\u65f6\u95f4\u5b8c\u6210 JS \u7684\u8bbe\u8ba1 (\u7531\u4e8e\u8bbe\u8ba1\u65f6\u95f4\u592a\u77ed&#xff0c;\u8bed\u8a00\u7684\u4e00\u4e9b\u7ec6\u8282\u8003\u8651\u5f97\u4e0d\u591f\u4e25\u8c28&#xff0c;\u5bfc\u81f4\u540e\u6765\u5f88\u957f\u4e00\u6bb5\u65f6\u95f4&#xff0c;Javascript \u5199\u51fa\u6765\u7684\u7a0b\u5e8f\u6df7\u4e71\u4e0d\u582a)<\/p>\n<p>\u6700\u521d\u5728\u7f51\u666f\u516c\u53f8, \u547d\u540d\u4e3a LiveScript,<\/p>\n<p>\u4e00\u822c\u8ba4\u4e3a&#xff0c;\u5f53\u65f6 Netscape \u4e4b\u6240\u4ee5\u5c06 LiveScript \u547d\u540d\u4e3a JavaScript&#xff0c;\u662f\u56e0\u4e3a Java \u662f\u5f53\u65f6\u6700\u6d41\u884c\u7684\u7f16\u7a0b\u8bed\u8a00&#xff0c;\u5e26\u6709 &#034;Java&#034; \u7684\u540d\u5b57\u6709\u52a9\u4e8e\u8fd9\u95e8\u65b0\u751f\u8bed\u8a00\u7684\u4f20\u64ad\u3002<\/p>\n<p>\u5176\u5b9e Java \u548c JavaScript \u4e4b\u95f4\u7684\u8bed\u6cd5\u98ce\u683c\u76f8\u53bb\u751a\u8fdc.<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"606\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131803-6a9ac50b87e4f.png\" width=\"829\" \/><\/p>\n<p>JavaScript \u53d1\u5c55\u5386\u53f2\u53ef\u4ee5\u53c2\u8003\u962e\u4e00\u5cf0\u5927\u795e\u7684\u535a\u5ba2<\/p>\n<h3 id=\"JavaScript%E5%92%8CHTML%E5%92%8CCSS%E4%B9%8B%E9%97%B4%E7%9A%84%E5%85%B3%E7%B3%BB\">JavaScript\u548cHTML\u548cCSS\u4e4b\u95f4\u7684\u5173\u7cfb<\/h3>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"693\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131803-6a9ac50bbf8d6.png\" width=\"1156\" \/><\/p>\n<p>HTML: \u7f51\u9875\u7684\u7ed3\u6784(\u9aa8)<\/p>\n<p>CSS: \u7f51\u9875\u7684\u8868\u73b0(\u76ae)<\/p>\n<p>JavaScript: \u7f51\u9875\u7684\u884c\u4e3a(\u9b42)<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"656\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131804-6a9ac50c524be.png\" width=\"1454\" \/><\/p>\n<h3 id=\"JavaScript%E8%BF%90%E8%A1%8C%E8%BF%87%E7%A8%8B\">JavaScript\u8fd0\u884c\u8fc7\u7a0b<\/h3>\n<p>\u7f16\u5199\u7684\u4ee3\u7801\u662f\u4fdd\u5b58\u5728\u6587\u4ef6\u4e2d\u7684, \u4e5f\u5c31\u662f\u5b58\u50a8\u5728\u786c\u76d8(\u5916\u5b58\u4e0a).<\/p>\n<p>\u53cc\u51fb .html \u6587\u4ef6\u6d4f\u89c8\u5668(\u5e94\u7528\u7a0b\u5e8f)\u5c31\u4f1a\u8bfb\u53d6\u6587\u4ef6, \u628a\u6587\u4ef6\u5185\u5bb9\u52a0\u8f7d\u5230\u5185\u5b58\u4e2d(\u6570\u636e\u6d41\u5411: \u786c\u76d8 &#061;&gt; \u5185\u5b58)<\/p>\n<p>\u6d4f\u89c8\u5668\u4f1a\u89e3\u6790\u7528\u6237\u7f16\u5199\u7684\u4ee3\u7801, \u628a\u4ee3\u7801\u7ffb\u8bd1\u6210\u4e8c\u8fdb\u5236\u7684, \u80fd\u8ba9\u8ba1\u7b97\u673a\u8bc6\u522b\u7684\u6307\u4ee4(\u89e3\u91ca\u5668\u7684\u5de5\u4f5c)\u5f97\u5230\u7684\u4e8c\u8fdb\u5236\u6307\u4ee4\u4f1a\u88ab CPU \u52a0\u8f7d\u5e76\u6267\u884c(\u6570\u636e\u6d41\u5411: \u5185\u5b58 &#061;&gt; CPU)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"686\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131804-6a9ac50cb1478.png\" width=\"1204\" \/><\/p>\n<p>\u6d4f\u89c8\u5668\u5206\u6210\u6e32\u67d3\u5f15\u64ce &#043; JS \u5f15\u64ce.<\/p>\n<p>\u6e32\u67d3\u5f15\u64ce: \u89e3\u6790 html &#043; CSS, \u4fd7\u79f0 &#034;\u5185\u6838&#034;<\/p>\n<p>JS \u5f15\u64ce: \u4e5f\u5c31\u662f JS \u89e3\u91ca\u5668. \u5178\u578b\u7684\u5c31\u662f Chrome \u4e2d\u5185\u7f6e\u7684 V8<\/p>\n<p>JS \u5f15\u64ce\u9010\u884c\u8bfb\u53d6 JS \u4ee3\u7801\u5185\u5bb9, \u7136\u540e\u89e3\u6790\u6210\u4e8c\u8fdb\u5236\u6307\u4ee4, \u518d\u6267\u884c<\/p>\n<h3 id=\"JavaScript%E7%9A%84%E7%BB%84%E6%88%90\">JavaScript\u7684\u7ec4\u6210<\/h3>\n<p>ECMAScript(\u7b80\u79f0 ES): JavaScript \u8bed\u6cd5<\/p>\n<p>DOM: \u9875\u9762\u6587\u6863\u5bf9\u8c61\u6a21\u578b, \u5bf9\u9875\u9762\u4e2d\u7684\u5143\u7d20\u8fdb\u884c\u64cd\u4f5c<\/p>\n<p>BOM: \u6d4f\u89c8\u5668\u5bf9\u8c61\u6a21\u578b, \u5bf9\u6d4f\u89c8\u5668\u7a97\u53e3\u8fdb\u884c\u64cd\u4f5c<\/p>\n<p>\u5149\u6709 JS \u8bed\u6cd5, \u53ea\u80fd\u5199\u4e00\u4e9b\u57fa\u7840\u7684\u903b\u8f91\u6d41\u7a0b.<\/p>\n<p>\u4f46\u662f\u8981\u60f3\u5b8c\u6210\u66f4\u590d\u6742\u7684\u4efb\u52a1, \u5b8c\u6210\u548c\u6d4f\u89c8\u5668\u4ee5\u53ca\u9875\u9762\u7684\u4ea4\u4e92, \u90a3\u4e48\u5c31\u9700\u8981 DOM API \u548c BOM API.<\/p>\n<p>\u8fd9\u4e3b\u8981\u6307\u5728\u6d4f\u89c8\u5668\u7aef\u8fd0\u884c\u7684 JS. \u5982\u679c\u662f\u8fd0\u884c\u5728\u670d\u52a1\u7aef\u7684 JS , \u5219\u9700\u8981\u4f7f\u7528 node.js \u7684 API,<\/p>\n<p>\u5c31\u4e0d\u592a\u9700\u8981\u5173\u6ce8 DOM \u548c BOM<\/p>\n<h4 id=\"%E9%87%8D%E8%A6%81%E6%A6%82%E5%BF%B5%3A%20ECMAScript\">\u91cd\u8981\u6982\u5ff5: ECMAScript<\/h4>\n<p>\u8fd9\u662f\u4e00\u5957 &#034;\u6807\u51c6&#034;, \u65e0\u8bba\u662f\u5565\u6837\u7684 JS \u5f15\u64ce\u90fd\u8981\u9075\u5b88\u8fd9\u4e2a\u6807\u51c6\u6765\u5b9e\u73b0.<\/p>\n<p>\u5565\u53eb\u6807\u51c6? \u8f66\u540c\u8f68, \u4e66\u540c\u6587. \u79e6\u59cb\u7687\u6700\u5927\u7684\u8d21\u732e\u4e4b\u4e00, \u5c31\u662f\u5236\u5b9a\u4e86\u4e00\u5957\u6807\u51c6.<\/p>\n<p>\u4e09\u6d41\u516c\u53f8\u505a\u4ea7\u54c1, \u4e00\u6d41\u516c\u53f8\u505a\u6807\u51c6<\/p>\n<h2 id=\"%E5%89%8D%E7%BD%AE%E7%9F%A5%E8%AF%86\">\u524d\u7f6e\u77e5\u8bc6<\/h2>\n<h3 id=\"%E7%AC%AC%E4%B8%80%E4%B8%AA%E7%A8%8B%E5%BA%8F\">\u7b2c\u4e00\u4e2a\u7a0b\u5e8f<\/h3>\n<p>\u6253\u5f00\u6d4f\u89c8\u5668&#xff0c;\u6309\u4e0b F12\u6253\u5f00\u5f00\u53d1\u8005\u6a21\u5f0f\u540e\u5728\u63a7\u5236\u53f0&#xff08;Console&#xff09;\u76f4\u63a5\u8f93\u5165\u4e00\u4e2aJavaScript\u8bed\u53e5&#xff0c;\u5c31\u80fd\u660e\u663e\u89c1\u5230\u56de\u5e94\u6548\u679c&#x1f447;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1017\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131805-6a9ac50d0a793.png\" width=\"1927\" \/><\/p>\n<p> &lt;script&gt;<br \/>\n \u00a0 \u00a0alert(&#034;\u4f60\u597d!&#034;);<br \/>\n&lt;\/script&gt; <\/p>\n<p>JavaScript \u4ee3\u7801\u53ef\u4ee5\u5d4c\u5165\u5230 HTML \u7684 script \u6807\u7b7e\u4e2d.<\/p>\n<h3 id=\"JavaScript%E7%9A%84%E4%B9%A6%E5%86%99%E5%BD%A2%E5%BC%8F\">JavaScript\u7684\u4e66\u5199\u5f62\u5f0f<\/h3>\n<h4 id=\"%E8%A1%8C%E5%86%85%E5%BC%8F\">\u884c\u5185\u5f0f<\/h4>\n<p>\u76f4\u63a5\u5d4c\u5165\u5230 html \u5143\u7d20\u5185\u90e8<\/p>\n<p> &lt;input type&#061;&#034;button&#034; value&#061;&#034;\u70b9\u6211\u4e00\u4e0b&#034; onclick&#061;&#034;alert(&#039;haha&#039;)&#034;&gt; <\/p>\n<p>\u6ce8\u610f, JS \u4e2d\u5b57\u7b26\u4e32\u5e38\u91cf\u53ef\u4ee5\u4f7f\u7528\u5355\u5f15\u53f7\u8868\u793a, \u4e5f\u53ef\u4ee5 \u4f7f\u7528\u53cc\u5f15\u53f7\u8868\u793a.<\/p>\n<p>HTML \u4e2d\u63a8\u8350\u4f7f\u7528\u53cc\u5f15\u53f7, JS \u4e2d\u63a8\u8350\u4f7f\u7528\u5355\u5f15\u53f7<\/p>\n<p>\u4ee3\u7801\u5c55\u793a&#x1f447;<\/p>\n<p> &lt;!DOCTYPE html&gt;<br \/>\n&lt;html lang&#061;&#034;en&#034;&gt;<br \/>\n&lt;head&gt;<br \/>\n    &lt;meta charset&#061;&#034;UTF-8&#034;&gt;<br \/>\n    &lt;meta name&#061;&#034;viewport&#034; content&#061;&#034;width&#061;device-width, initial-scale&#061;1.0&#034;&gt;<br \/>\n    &lt;title&gt;Document&lt;\/title&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;input type&#061;&#034;button&#034; value&#061;&#034;\u70b9\u6211\u4e00\u4e0b&#034; onclick&#061;&#034;alert(&#039;haha&#039;)&#034;&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt; <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"241\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131805-6a9ac50dd5aea.png\" width=\"1919\" \/><\/p>\n<p>\u6ce8\u610f&#xff1a;\u5728 JavaScript \u4e2d\u53ef\u4ee5 \u5355\u5f15\u53f7\u548c\u53cc\u5f15\u53f7\u53ef\u4ee5\u5207\u6362\u4f7f\u7528&#xff0c;\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\u5c06\u5355\u5f15\u53f7\u548c\u53cc\u5f15\u53f7\u4e92\u6362\u4f4d\u7f6e\u540e&#xff0c;\u4ee3\u7801\u6548\u679c\u662f\u4e00\u6837\u7684<\/p>\n<h4 id=\"%E5%86%85%E5%B5%8C%E5%BC%8F\">\u5185\u5d4c\u5f0f<\/h4>\n<p>\u5199\u5230 script \u6807\u7b7e\u4e2d<\/p>\n<p> &lt;script&gt;<br \/>\n \u00a0 \u00a0alert(&#034;haha&#034;);<br \/>\n&lt;\/script&gt; <\/p>\n<h4 id=\"%E5%A4%96%E9%83%A8%E5%BC%8F\">\u5916\u90e8\u5f0f<\/h4>\n<p>\u5199\u5230\u5355\u72ec\u7684 .js \u6587\u4ef6\u4e2d<\/p>\n<p> &lt;script src&#061;&#034;hello.js&#034;&gt;&lt;\/script&gt;<br \/>\n alert(&#034;hehe&#034;); <\/p>\n<p>\u6ce8\u610f, \u8fd9\u79cd\u60c5\u51b5\u4e0b script \u6807\u7b7e\u4e2d\u95f4\u4e0d\u80fd\u5199\u4ee3\u7801. \u5fc5\u987b\u7a7a\u7740(\u5199\u4e86\u4ee3\u7801\u4e5f\u4e0d\u4f1a\u6267\u884c).<\/p>\n<p>\u9002\u5408\u4ee3\u7801\u591a\u7684\u60c5\u51b5<\/p>\n<p>\u4ee3\u7801\u5c55\u793a&#x1f447;<\/p>\n<p> &lt;!DOCTYPE html&gt;<br \/>\n&lt;html lang&#061;&#034;en&#034;&gt;<br \/>\n&lt;head&gt;<br \/>\n    &lt;meta charset&#061;&#034;UTF-8&#034;&gt;<br \/>\n    &lt;meta name&#061;&#034;viewport&#034; content&#061;&#034;width&#061;device-width, initial-scale&#061;1.0&#034;&gt;<br \/>\n    &lt;title&gt;Document&lt;\/title&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;script src&#061;&#034;.\/demo02.js&#034;&gt;&lt;\/script&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<br \/>\n alert(&#034;\u6211\u5728\u5b66\u4e60JavaScript&#034;); <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"270\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131806-6a9ac50e13930.png\" width=\"1915\" \/><\/p>\n<h4 id=\"%E6%B3%A8%E9%87%8A\">\u6ce8\u91ca<\/h4>\n<p>\u5355\u884c\u6ce8\u91ca \/\/ [\u5efa\u8bae\u4f7f\u7528]<\/p>\n<p>\u591a\u884c\u6ce8\u91ca \/* *\/<\/p>\n<p>\/\/ \u6211\u662f\u5355\u884c\u6ce8\u91ca<br \/>\n\/*<br \/>\n \u00a0 \u6211\u662f\u591a\u884c\u6ce8\u91ca<br \/>\n \u00a0 \u6211\u662f\u591a\u884c\u6ce8\u91ca<br \/>\n \u00a0 \u6211\u662f\u591a\u884c\u6ce8\u91ca<br \/>\n*\/ <\/p>\n<p>\u4f7f\u7528 ctrl &#043; \/ \u5207\u6362\u6ce8\u91ca.<\/p>\n<p>\u591a\u884c\u6ce8\u91ca\u4e0d\u80fd\u5d4c\u5957. \u5f62\u5982\u8fd9\u79cd\u4ee3\u7801\u5c31\u4f1a\u62a5\u9519<\/p>\n<p>\/*<br \/>\n\/*<br \/>\n \u00a0 \u6211\u662f\u591a\u884c\u6ce8\u91ca<br \/>\n \u00a0 \u6211\u662f\u591a\u884c\u6ce8\u91ca<br \/>\n \u00a0 \u6211\u662f\u591a\u884c\u6ce8\u91ca<br \/>\n*\/<br \/>\n*\/ <\/p>\n<h3 id=\"%E8%BE%93%E5%85%A5%E8%BE%93%E5%87%BA\">\u8f93\u5165\u8f93\u51fa<\/h3>\n<h4 id=\"%E8%BE%93%E5%85%A5%EF%BC%9Aprompt\">\u8f93\u5165&#xff1a;prompt<\/h4>\n<p>\u5f39\u51fa\u4e00\u4e2a\u8f93\u5165\u6846<\/p>\n<p> \/\/ \u5f39\u51fa\u4e00\u4e2a\u8f93\u5165\u6846<br \/>\nprompt(&#034;\u8bf7\u8f93\u5165\u60a8\u7684\u59d3\u540d:&#034;); <\/p>\n<h4 id=\"%E8%BE%93%E5%87%BA%EF%BC%9Aalert\">\u8f93\u51fa&#xff1a;alert<\/h4>\n<p>\u5f39\u51fa\u4e00\u4e2a\u8b66\u793a\u5bf9\u8bdd\u6846, \u8f93\u51fa\u7ed3\u679c<\/p>\n<p> \/\/ \u5f39\u51fa\u4e00\u4e2a\u8f93\u51fa\u6846<br \/>\nalert(&#034;hello&#034;); <\/p>\n<h4 id=\"%E8%BE%93%E5%87%BA%EF%BC%9Aconsole.log\">\u8f93\u51fa&#xff1a;console.log<\/h4>\n<p>\u5728\u63a7\u5236\u53f0\u6253\u5370\u4e00\u4e2a\u65e5\u5fd7(\u4f9b\u7a0b\u5e8f\u5458\u770b)<\/p>\n<p> \/\/ \u5411\u63a7\u5236\u53f0\u8f93\u51fa\u65e5\u5fd7<br \/>\nconsole.log(&#034;\u8fd9\u662f\u4e00\u6761\u65e5\u5fd7&#034;); <\/p>\n<p>\u6ce8\u610f: \u5728 VSCode \u4e2d\u76f4\u63a5\u8f93\u5165 &#034;log&#034; \u518d\u6309 tab \u952e, \u5c31\u53ef\u4ee5\u5feb\u901f\u8f93\u5165 console.log<\/p>\n<p>\u9700\u8981\u6253\u5f00\u6d4f\u89c8\u5668\u7684\u5f00\u53d1\u8005\u5de5\u5177(F12) &#061;&gt; Console \u6807\u7b7e\u9875 \u624d\u80fd\u770b\u5230\u7ed3\u679c<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"261\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131806-6a9ac50e4897f.png\" width=\"1371\" \/><\/p>\n<p>\u8fd9\u6837\u7684\u8f93\u51fa\u4e00\u822c\u4e0d\u662f\u7ed9\u666e\u901a\u7528\u6237\u770b\u7684, \u800c\u662f\u7a0b\u5e8f\u5458\u6765\u770b\u7684.<\/p>\n<h4 id=\"%E9%87%8D%E8%A6%81%E6%A6%82%E5%BF%B5%EF%BC%9A%E6%97%A5%E5%BF%97\">\u91cd\u8981\u6982\u5ff5&#xff1a;\u65e5\u5fd7<\/h4>\n<p>\u65e5\u5fd7\u662f\u7a0b\u5e8f\u5458\u8c03\u8bd5\u7a0b\u5e8f\u7684\u91cd\u8981\u624b\u6bb5<\/p>\n<p>\u53bb\u533b\u9662\u770b\u75c5, \u533b\u751f\u4f1a\u8ba9\u60a3\u8005\u505a\u5404\u79cd\u68c0\u67e5, \u8840\u5e38\u89c4, \u5c3f\u5e38\u89c4, B\u8d85, CT\u7b49&#8230; \u6b64\u65f6\u5f97\u5230\u4e00\u5806\u68c0\u6d4b\u7ed3\u679c. \u8fd9\u4e9b\u7ed3\u679c\u666e\u901a\u4eba\u770b\u4e0d\u61c2, \u4f46\u662f\u533b\u751f\u80fd\u770b\u61c2, \u5e76\u4e14\u533b\u751f\u8981\u901a\u8fc7\u8fd9\u4e9b\u4fe1\u606f\u6765\u8bca\u65ad\u75c5\u60c5.<\/p>\n<p>\u8fd9\u4e9b\u68c0\u6d4b\u7ed3\u679c\u5c31\u662f\u533b\u751f\u7684 &#034;\u65e5\u5fd7&#034;<\/p>\n<p>PS: \u76f8\u6bd4\u4e8e\u533b\u751f\u6765\u8bf4, \u7a0b\u5e8f\u733f\u591a\u4e00\u4e2a\u7ec8\u6781\u5927\u62db, &#034;\u91cd\u542f\u4e0b\u8bd5\u8bd5&#034;.<\/p>\n<h4 id=\"%E9%87%8D%E8%A6%81%E6%A6%82%E5%BF%B5%EF%BC%9A\">\u91cd\u8981\u6982\u5ff5&#xff1a;<\/h4>\n<p>console \u662f\u4e00\u4e2a js \u4e2d\u7684 &#034;\u5bf9\u8c61&#034;<\/p>\n<p>. \u8868\u793a\u53d6\u5bf9\u8c61\u4e2d\u7684\u67d0\u4e2a\u5c5e\u6027\u6216\u8005\u65b9\u6cd5. \u53ef\u4ee5\u76f4\u89c2\u7406\u89e3\u6210 &#034;\u7684&#034;<\/p>\n<p>console.log \u5c31\u53ef\u4ee5\u7406\u89e3\u6210: \u4f7f\u7528 &#034;\u63a7\u5236\u53f0&#034; \u5bf9\u8c61 &#034;\u7684&#034; log \u65b9\u6cd5<\/p>\n<h2 id=\"%E8%AF%AD%E6%B3%95%E6%A6%82%E8%A7%88\">\u8bed\u6cd5\u6982\u89c8<\/h2>\n<p>JavaScript \u867d\u7136\u4e00\u4e9b\u8bbe\u8ba1\u7406\u5ff5\u548c Java \u76f8\u53bb\u751a\u8fdc, \u4f46\u662f\u5728\u57fa\u7840\u8bed\u6cd5\u5c42\u9762\u4e0a\u8fd8\u662f\u6709\u4e00\u4e9b\u76f8\u4f3c\u4e4b\u5904\u7684.<\/p>\n<p>\u6709\u4e86 Java \u7684\u57fa\u7840\u5f88\u5bb9\u6613\u7406\u89e3 JavaScript \u7684\u4e00\u4e9b\u57fa\u672c\u8bed\u6cd5<\/p>\n<h3 id=\"%E5%8F%98%E9%87%8F%E7%9A%84%E4%BD%BF%E7%94%A8\">\u53d8\u91cf\u7684\u4f7f\u7528<\/h3>\n<h4 id=\"%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95\">\u57fa\u672c\u7528\u6cd5<\/h4>\n<p>\u521b\u5efa\u53d8\u91cf(\u53d8\u91cf\u5b9a\u4e49\/\u53d8\u91cf\u58f0\u660e\/\u53d8\u91cf\u521d\u59cb\u5316)<\/p>\n<p> var name &#061; &#039;zhangsan&#039;;<br \/>\nvar age &#061; 20; <\/p>\n<p>\u4ee3\u7801\u5c55\u793a&#x1f447;<\/p>\n<p> &lt;!DOCTYPE html&gt;<br \/>\n&lt;html lang&#061;&#034;en&#034;&gt;<br \/>\n&lt;head&gt;<br \/>\n    &lt;meta charset&#061;&#034;UTF-8&#034;&gt;<br \/>\n    &lt;meta name&#061;&#034;viewport&#034; content&#061;&#034;width&#061;device-width, initial-scale&#061;1.0&#034;&gt;<br \/>\n    &lt;title&gt;Document&lt;\/title&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;!&#8211; &lt;input type&#061;&#034;button&#034; value&#061;&#034;\u70b9\u6211\u4e00\u4e0b&#034; onclick&#061;&#034;alert(&#039;haha&#039;)&#034;&gt; &#8211;&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;script&gt;<br \/>\n    var name&#061;&#034;CoderYanger&#034;;<br \/>\n    console.log(name)<br \/>\n&lt;\/script&gt;<br \/>\n&lt;\/html&gt; <\/p>\n<p>\u6253\u5370\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"592\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131806-6a9ac50e6c869.png\" width=\"1919\" \/><\/p>\n<p>var \u662f JS \u4e2d\u7684\u5173\u952e\u5b57, \u8868\u793a\u8fd9\u662f\u4e00\u4e2a\u53d8\u91cf.<\/p>\n<p>&#061; \u5728 JS \u4e2d\u8868\u793a &#034;\u8d4b\u503c&#034;, \u76f8\u5f53\u4e8e\u628a\u6570\u636e\u653e\u5230\u5185\u5b58\u7684\u76d2\u5b50\u4e2d. &#061; \u4e24\u4fa7\u5efa\u8bae\u6709\u4e00\u4e2a\u7a7a\u683c<\/p>\n<p>\u6bcf\u4e2a\u8bed\u53e5\u6700\u540e\u5e26\u6709\u4e00\u4e2a ; \u7ed3\u5c3e. JS \u4e2d\u53ef\u4ee5\u7701\u7565 ; \u4f46\u662f\u5efa\u8bae\u8fd8\u662f\u52a0\u4e0a.<\/p>\n<p>\u6ce8\u610f, \u6b64\u5904\u7684 ; \u4e3a\u82f1\u6587\u5206\u53f7. JS \u4e2d\u6240\u6709\u7684\u6807\u70b9\u90fd\u662f\u82f1\u6587\u6807\u70b9.<\/p>\n<p>\u521d\u59cb\u5316\u7684\u503c\u5982\u679c\u662f\u5b57\u7b26\u4e32, \u90a3\u4e48\u5c31\u8981\u4f7f\u7528\u5355\u5f15\u53f7\u6216\u8005\u53cc\u5f15\u53f7\u5f15\u8d77\u6765.<\/p>\n<p>\u521d\u59cb\u5316\u7684\u503c\u5982\u679c\u662f\u6570\u5b57, \u90a3\u4e48\u76f4\u63a5\u8d4b\u503c\u5373\u53ef<\/p>\n<p>\u8fd8\u6709\u53e6\u5916\u4e00\u79cd\u5b9a\u4e49\u65b9\u5f0f&#xff1a;\u4f7f\u7528 let&#xff0c;\u4ee3\u7801\u5c55\u793a&#x1f447;<\/p>\n<p> &lt;!DOCTYPE html&gt;<br \/>\n&lt;html lang&#061;&#034;en&#034;&gt;<br \/>\n&lt;head&gt;<br \/>\n    &lt;meta charset&#061;&#034;UTF-8&#034;&gt;<br \/>\n    &lt;meta name&#061;&#034;viewport&#034; content&#061;&#034;width&#061;device-width, initial-scale&#061;1.0&#034;&gt;<br \/>\n    &lt;title&gt;Document&lt;\/title&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;!&#8211; &lt;input type&#061;&#034;button&#034; value&#061;&#034;\u70b9\u6211\u4e00\u4e0b&#034; onclick&#061;&#034;alert(&#039;haha&#039;)&#034;&gt; &#8211;&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;script&gt;<br \/>\n    var name&#061;&#034;CoderYanger&#034;;<br \/>\n    console.log(name)<br \/>\n    let age&#061;30;<br \/>\n    console.log(age)<br \/>\n&lt;\/script&gt;<br \/>\n&lt;\/html&gt; <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"608\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131806-6a9ac50ee92fd.png\" width=\"1918\" \/><\/p>\n<p>\u4e3a\u4ec0\u4e48\u66f4\u52a0\u63a8\u8350\u4f7f\u7528 let \u4ee3\u66ff var \u5462&#xff1f;&#xff1f;<\/p>\n<p>\u56e0\u4e3a let \u6bd4 var \u51fa\u73b0\u7684\u665a&#xff0c;\u610f\u5473\u7740\u907f\u514d\u4e86 var \u8fd9\u5757\u5b9a\u4e49\u53d8\u91cf\u7684\u65f6\u5019\u7684\u4e00\u4e9b\u7f3a\u9677<\/p>\n<p>\u5982\u679c\u4f7f\u7528 let \u5b9a\u4e49\u53d8\u91cf&#xff0c;\u6b64\u65f6\u751f\u547d\u5468\u671f\u3001\u4f5c\u7528\u57df&#xff0c;\u57fa\u672c\u548c Java \u662f\u7c7b\u4f3c\u7684<\/p>\n<p>\u800c\u4e14 JS \u5b9a\u4e49\u4e00\u4e2a\u53d8\u91cf\u7684\u65f6\u5019&#xff0c;\u4e0d\u9700\u8981\u5bf9\u8fd9\u4e2a\u53d8\u91cf\u6307\u5b9a\u7c7b\u578b~~<\/p>\n<p>\u4f60\u7ed9\u8d4b\u503c\u6210\u5b57\u7b26\u4e32&#xff0c;\u5c31\u662f\u5b57\u7b26\u4e32&#xff0c;\u4f60\u7ed9\u8d4b\u503c\u6570\u5b57&#xff0c;\u90a3\u5c31\u662f\u6570\u5b57<\/p>\n<p>\u540c\u65f6&#xff0c;\u5728 JS \u91cc\u9762\u5bf9\u4e8e\u6570\u5b57\u53ea\u6709\u4e00\u79cd\u7c7b\u578b&#xff1a;\u6570\u503c\u7c7b\u578b&#xff08;\u53ef\u4ee5\u662f\u5c0f\u6570&#xff0c;\u4e5f\u53ef\u4ee5\u662f\u6574\u6570&#xff09;<\/p>\n<h5 id=\"%E4%BD%BF%E7%94%A8%E5%8F%98%E9%87%8F\">\u4f7f\u7528\u53d8\u91cf<\/h5>\n<p>console.log(age); \/\/ \u8bfb\u53d6\u53d8\u91cf\u5185\u5bb9<br \/>\nage &#061; 30; \u00a0 \u00a0 \u00a0 \u00a0 \/\/ \u4fee\u6539\u53d8\u91cf\u5185\u5bb9 <\/p>\n<p>\u4e3a\u5565\u52a8\u6f2b\u4e2d\u7684\u89d2\u8272\u90fd\u662f\u8981\u5148\u558a\u51fa\u6280\u80fd\u540d\u5b57\u518d\u771f\u6b63\u91ca\u653e\u6280\u80fd?<\/p>\n<p>\u5c31\u662f\u56e0\u4e3a\u53d8\u91cf\u8981\u5148\u58f0\u660e\u624d\u80fd\u4f7f\u7528<\/p>\n<h5 id=\"%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B%EF%BC%9A%E5%BC%B9%E6%A1%86%E6%8F%90%E7%A4%BA%E7%94%A8%E6%88%B7%E8%BE%93%E5%85%A5%E4%BF%A1%E6%81%AF%2C%20%E5%86%8D%E5%BC%B9%E6%A1%86%E6%98%BE%E7%A4%BA\">\u4ee3\u7801\u793a\u4f8b&#xff1a;\u5f39\u6846\u63d0\u793a\u7528\u6237\u8f93\u5165\u4fe1\u606f, \u518d\u5f39\u6846\u663e\u793a<\/h5>\n<p>var name &#061; prompt(&#034;\u8bf7\u8f93\u5165\u59d3\u540d:&#034;);<br \/>\nvar age &#061; prompt(&#034;\u8bf7\u8f93\u5165\u5e74\u9f84:&#034;);<br \/>\nvar score &#061; prompt(&#034;\u8bf7\u8f93\u5165\u5206\u6570&#034;);<br \/>\nalert(&#034;\u60a8\u7684\u59d3\u540d\u662f: &#034; &#043; name);<br \/>\nalert(&#034;\u60a8\u7684\u5e74\u9f84\u662f: &#034; &#043; age);<br \/>\nalert(&#034;\u60a8\u7684\u5206\u6570\u662f: &#034; &#043; score); <\/p>\n<p>\u4e5f\u53ef\u4ee5\u628a\u4e09\u4e2a\u8f93\u51fa\u5185\u5bb9\u5408\u5e76\u6210\u4e00\u6b21\u5f39\u6846<\/p>\n<p>var name &#061; prompt(&#034;\u8bf7\u8f93\u5165\u59d3\u540d:&#034;);<br \/>\nvar age &#061; prompt(&#034;\u8bf7\u8f93\u5165\u5e74\u9f84:&#034;);<br \/>\nvar score &#061; prompt(&#034;\u8bf7\u8f93\u5165\u5206\u6570&#034;);<br \/>\nalert(&#034;\u60a8\u7684\u59d3\u540d\u662f: &#034; &#043; name &#043; &#034;\\\\n&#034; &#043; &#034;\u60a8\u7684\u5e74\u9f84\u662f: &#034; &#043; age &#043; &#034;\\\\n&#034; &#043; &#034;\u60a8\u7684\u5206\u6570\u662f: &#034; &#043;<br \/>\nscore &#043; &#034;\\\\n&#034;); <\/p>\n<p>&#043; \u8868\u793a\u5b57\u7b26\u4e32\u62fc\u63a5, \u4e5f\u5c31\u662f\u628a\u4e24\u4e2a\u5b57\u7b26\u4e32\u9996\u5c3e\u76f8\u63a5\u53d8\u6210\u4e00\u4e2a\u5b57\u7b26\u4e32.<\/p>\n<p>\\\\n \u8868\u793a\u6362\u884c<\/p>\n<p>JavaScript \u4e2d\u8fd8\u652f\u6301\u4f7f\u7528 let \u5b9a\u4e49\u53d8\u91cf. \u7528\u6cd5\u548c var \u57fa\u672c\u7c7b\u4f3c. \u7528\u6cd5\u4e0a\u7684\u5dee\u5f02\u6b64\u5904\u6682\u65f6\u4e0d\u8ba8\u8bba.<\/p>\n<h4 id=\"%E7%90%86%E8%A7%A3%E5%8A%A8%E6%80%81%E7%B1%BB%E5%9E%8B\">\u7406\u89e3\u52a8\u6001\u7c7b\u578b<\/h4>\n<p><span style=\"--darkreader-inline-color:#ffa31a;color:#ff9900\">\u7b54\u7591<\/span><\/p>\n<p><span style=\"--darkreader-inline-color:#ffa31a;color:#ff9900\">Q1&#xff1a;\u4ec0\u4e48\u662f\u5f3a\u7c7b\u578b\u53d8\u91cf&#xff1f;\u4ec0\u4e48\u662f\u5f31\u7c7b\u578b\u53d8\u91cf&#xff1f;<\/span><\/p>\n<p>\u4ee3\u7801\u5c55\u793a&#x1f447;<\/p>\n<p> &lt;!DOCTYPE html&gt;<br \/>\n&lt;html lang&#061;&#034;en&#034;&gt;<br \/>\n&lt;head&gt;<br \/>\n    &lt;meta charset&#061;&#034;UTF-8&#034;&gt;<br \/>\n    &lt;meta name&#061;&#034;viewport&#034; content&#061;&#034;width&#061;device-width, initial-scale&#061;1.0&#034;&gt;<br \/>\n    &lt;title&gt;Document&lt;\/title&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;script&gt;<br \/>\n        a &#061; 1<br \/>\n        b &#061; &#039;b&#039;<br \/>\n        b &#061; a<br \/>\n        console.log(b)<br \/>\n    &lt;\/script&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt; <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"484\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131807-6a9ac50f5b9e0.png\" width=\"1919\" \/><\/p>\n<p>\u6211\u4eec\u53d1\u73b0 b &#061; 1&#xff0c;\u4e14\u4ee3\u7801\u4e5f\u6ca1\u6709\u62a5\u9519&#xff0c;\u8bc1\u660e JavaScript \u5c5e\u4e8e\u5f31\u7c7b\u578b\u8bed\u8a00&#xff0c;\u5b83\u6240\u5b9a\u4e49\u7684\u53d8\u91cf\u4e5f\u5c31\u5c5e\u4e8e\u5f31\u7c7b\u578b\u53d8\u91cf~~<\/p>\n<p><span style=\"--darkreader-inline-color:#ffa31a;color:#ff9900\">Q2&#xff1a;\u4ec0\u4e48\u662f\u52a8\u6001\u7c7b\u578b\u53d8\u91cf&#xff1f;\u4ec0\u4e48\u662f\u9759\u6001\u7c7b\u578b\u53d8\u91cf&#xff1f;<\/span><\/p>\n<p>\u52a8\u6001\u7c7b\u578b\u610f\u5473\u7740\u4ee3\u7801\u5728\u6267\u884c\u8fc7\u7a0b\u4e2d&#xff0c;\u53d8\u91cf\u7c7b\u578b\u53ef\u4ee5\u968f\u65f6\u53d1\u751f\u53d8\u5316<\/p>\n<p>\u9759\u6001\u7c7b\u578b\u610f\u5473\u7740\u53d8\u91cf\u5b9a\u4e49\u7684\u65f6\u5019\u662f\u4ec0\u4e48\u7c7b\u578b&#xff0c;\u5728\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u5c31\u662f\u4ec0\u4e48\u7c7b\u578b<\/p>\n<p>\u6211\u4eec\u53ef\u4ee5\u5c06\u4e0a\u8ff0\u4ee3\u7801\u7a0d\u4f5c\u4fee\u6539&#xff0c;\u89c2\u5bdf a \u7684\u7c7b\u578b\u662f\u5426\u6539\u53d8&#xff0c;\u4ee3\u7801\u5c55\u793a&#x1f447;<\/p>\n<p> &lt;!DOCTYPE html&gt;<br \/>\n&lt;html lang&#061;&#034;en&#034;&gt;<br \/>\n&lt;head&gt;<br \/>\n    &lt;meta charset&#061;&#034;UTF-8&#034;&gt;<br \/>\n    &lt;meta name&#061;&#034;viewport&#034; content&#061;&#034;width&#061;device-width, initial-scale&#061;1.0&#034;&gt;<br \/>\n    &lt;title&gt;Document&lt;\/title&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;script&gt;<br \/>\n        a &#061; 1<br \/>\n        console.log(typeof(a))<br \/>\n        b &#061; &#039;b&#039;<br \/>\n        a &#061; b<br \/>\n        console.log(typeof(a))<br \/>\n    &lt;\/script&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt; <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"628\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131807-6a9ac50fae397.png\" width=\"1919\" \/><\/p>\n<p>\u6211\u4eec\u53d1\u73b0 a \u7684\u7c7b\u578b\u4ece number \u8f6c\u6362\u6210\u4e86 string<\/p>\n<p>\u8bf4\u660e JavaScript\u00a0\u4e2d\u7684\u53d8\u91cf\u662f\u4e00\u4e2a\u52a8\u6001\u7c7b\u578b\u53d8\u91cf~~<\/p>\n<h5 id=\"1)%20JS%20%E7%9A%84%E5%8F%98%E9%87%8F%E7%B1%BB%E5%9E%8B%E6%98%AF%E7%A8%8B%E5%BA%8F%E8%BF%90%E8%A1%8C%E8%BF%87%E7%A8%8B%E4%B8%AD%E6%89%8D%E7%A1%AE%E5%AE%9A%E7%9A%84(%E8%BF%90%E8%A1%8C%E5%88%B0%20%3D%20%E8%AF%AD%E5%8F%A5%E6%89%8D%E4%BC%9A%E7%A1%AE%E5%AE%9A%E7%B1%BB%E5%9E%8B)\">1) JS \u7684\u53d8\u91cf\u7c7b\u578b\u662f\u7a0b\u5e8f\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u624d\u786e\u5b9a\u7684(\u8fd0\u884c\u5230 &#061; \u8bed\u53e5\u624d\u4f1a\u786e\u5b9a\u7c7b\u578b)<\/h5>\n<p>var a &#061; 10; \u00a0 \u00a0 \/\/ \u6570\u5b57<br \/>\nvar b &#061; &#034;hehe&#034;; \/\/ \u5b57\u7b26\u4e32 <\/p>\n<h5 id=\"2)%20%E9%9A%8F%E7%9D%80%E7%A8%8B%E5%BA%8F%E8%BF%90%E8%A1%8C%2C%20%E5%8F%98%E9%87%8F%E7%9A%84%E7%B1%BB%E5%9E%8B%E5%8F%AF%E8%83%BD%E4%BC%9A%E5%8F%91%E7%94%9F%E6%94%B9%E5%8F%98.\">2) \u968f\u7740\u7a0b\u5e8f\u8fd0\u884c, \u53d8\u91cf\u7684\u7c7b\u578b\u53ef\u80fd\u4f1a\u53d1\u751f\u6539\u53d8.<\/h5>\n<p>var a &#061; 10; \u00a0 \u00a0\/\/ \u6570\u5b57<br \/>\na &#061; &#034;hehe&#034;; \u00a0 \u00a0\/\/ \u5b57\u7b26\u4e32 <\/p>\n<p>\u8fd9\u4e00\u70b9\u548c C Java \u8fd9\u79cd\u9759\u6001\u7c7b\u578b\u8bed\u8a00\u5dee\u5f02\u8f83\u5927.<\/p>\n<p>C, C&#043;&#043;, Java, Go \u7b49\u8bed\u8a00\u662f\u9759\u6001\u7c7b\u578b\u8bed\u8a00. \u4e00\u4e2a\u53d8\u91cf\u5728\u521b\u5efa\u7684\u65f6\u5019\u7c7b\u578b\u5c31\u786e\u5b9a\u4e86, \u4e0d\u80fd\u5728\u8fd0\u884c\u65f6\u53d1\u751f\u6539\u53d8.<\/p>\n<p>\u5982\u679c\u5c1d\u8bd5\u6539\u53d8, \u5c31\u4f1a\u76f4\u63a5\u7f16\u8bd1\u62a5\u9519<\/p>\n<h3 id=\"%E5%9F%BA%E6%9C%AC%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B\">\u57fa\u672c\u6570\u636e\u7c7b\u578b<\/h3>\n<p>JS \u4e2d\u5185\u7f6e\u7684\u51e0\u79cd\u7c7b\u578b<\/p>\n<p>number: \u6570\u5b57. \u4e0d\u533a\u5206\u6574\u6570\u548c\u5c0f\u6570.<\/p>\n<p>boolean: true \u771f, false \u5047.<\/p>\n<p>string: \u5b57\u7b26\u4e32\u7c7b\u578b.<\/p>\n<p>undefined: \u53ea\u6709\u552f\u4e00\u7684\u503c undefined. \u8868\u793a\u672a\u5b9a\u4e49\u7684\u503c.<\/p>\n<p>null: \u53ea\u6709\u552f\u4e00\u7684\u503c null. \u8868\u793a\u7a7a\u503c<\/p>\n<h4 id=\"number%E6%95%B0%E5%AD%97%E7%B1%BB%E5%9E%8B\">number\u6570\u5b57\u7c7b\u578b<\/h4>\n<p>JS \u4e2d\u4e0d\u533a\u5206\u6574\u6570\u548c\u6d6e\u70b9\u6570, \u7edf\u4e00\u90fd\u4f7f\u7528 &#034;\u6570\u5b57\u7c7b\u578b&#034; \u6765\u8868\u793a<\/p>\n<p>\u4ee3\u7801\u5c55\u793a&#x1f447;<\/p>\n<p> &lt;!DOCTYPE html&gt;<br \/>\n&lt;html lang&#061;&#034;en&#034;&gt;<br \/>\n&lt;head&gt;<br \/>\n    &lt;meta charset&#061;&#034;UTF-8&#034;&gt;<br \/>\n    &lt;meta name&#061;&#034;viewport&#034; content&#061;&#034;width&#061;device-width, initial-scale&#061;1.0&#034;&gt;<br \/>\n    &lt;title&gt;Document&lt;\/title&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;script&gt;<br \/>\n        \/\/ a &#061; 1<br \/>\n        \/\/ console.log(typeof(a))<br \/>\n        \/\/ b &#061; &#039;b&#039;<br \/>\n        \/\/ a &#061; b<br \/>\n        \/\/ console.log(typeof(a))<br \/>\n        let a &#061; 10;<br \/>\n        console.log(typeof(a))<br \/>\n        a &#061; a \/ 3<br \/>\n        console.log(a)<br \/>\n        console.log(typeof(a))<br \/>\n    &lt;\/script&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt; <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"686\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131808-6a9ac510242f4.png\" width=\"1919\" \/><\/p>\n<p>\u6240\u4ee5 \u4e0d\u7ba1\u662f\u5c0f\u6570\u8fd8\u662f\u6574\u6570&#xff0c;\u7edf\u4e00\u90fd\u662f number \u7c7b\u578b<\/p>\n<h4 id=\"%E6%95%B0%E5%AD%97%E8%BF%9B%E5%88%B6%E8%A1%A8%E7%A4%BA\">\u6570\u5b57\u8fdb\u5236\u8868\u793a<\/h4>\n<p>\u8ba1\u7b97\u673a\u4e2d\u90fd\u662f\u4f7f\u7528\u4e8c\u8fdb\u5236\u6765\u8868\u793a\u6570\u636e, \u800c\u4eba\u5e73\u65f6\u90fd\u662f\u4f7f\u7528\u5341\u8fdb\u5236.<\/p>\n<p>\u56e0\u4e3a\u4e8c\u8fdb\u5236\u5728\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u4e0d\u592a\u65b9\u4fbf(01\u592a\u591a\u4f1a\u770b\u82b1\u773c).<\/p>\n<p>\u6240\u4ee5\u5728\u65e5\u5e38\u4f7f\u7528\u4e8c\u8fdb\u5236\u6570\u5b57\u65f6\u5f80\u5f80\u4f7f\u7528 \u516b\u8fdb\u5236 \u548c \u5341\u516d\u8fdb\u5236 \u6765\u8868\u793a\u4e8c\u8fdb\u5236\u6570\u5b57<\/p>\n<p> var a &#061; 07; \u00a0 \u00a0 \u00a0\/\/ \u516b\u8fdb\u5236\u6574\u6570, \u4ee5 0 \u5f00\u5934<br \/>\nvar b &#061; 0xa; \u00a0 \u00a0 \/\/ \u5341\u516d\u8fdb\u5236\u6574\u6570, \u4ee5 0x \u5f00\u5934<br \/>\nvar c &#061; 0b10; \u00a0 \u00a0\/\/ \u4e8c\u8fdb\u5236\u6574\u6570, \u4ee5 0b \u5f00\u5934 <\/p>\n<p>\u6ce8\u610f:<\/p>\n<p>\u4e00\u4e2a\u516b\u8fdb\u5236\u6570\u5b57\u5bf9\u5e94\u4e09\u4e2a\u4e8c\u8fdb\u5236\u6570\u5b57<\/p>\n<p>\u4e00\u4e2a\u5341\u516d\u8fdb\u5236\u6570\u5b57\u5bf9\u5e94\u56db\u4e2a\u4e8c\u8fdb\u5236\u6570\u5b57. (\u4e24\u4e2a\u5341\u516d\u8fdb\u5236\u6570\u5b57\u5c31\u662f\u4e00\u4e2a\u5b57\u8282)<\/p>\n<p>\u5404\u79cd\u8fdb\u5236\u4e4b\u95f4\u7684\u8f6c\u6362, \u4e0d\u9700\u8981\u624b\u5de5\u8ba1\u7b97, \u76f4\u63a5\u4f7f\u7528\u8ba1\u7b97\u5668\u5373\u53ef<\/p>\n<h4 id=\"%E7%89%B9%E6%AE%8A%E7%9A%84%E6%95%B0%E5%AD%97%E5%80%BC\">\u7279\u6b8a\u7684\u6570\u5b57\u503c<\/h4>\n<p>Infinity: \u65e0\u7a77\u5927, \u5927\u4e8e\u4efb\u4f55\u6570\u5b57. \u8868\u793a\u6570\u5b57\u5df2\u7ecf\u8d85\u8fc7\u4e86 JS \u80fd\u8868\u793a\u7684\u8303\u56f4.<\/p>\n<p>-Infinity: \u8d1f\u65e0\u7a77\u5927, \u5c0f\u4e8e\u4efb\u4f55\u6570\u5b57. \u8868\u793a\u6570\u5b57\u5df2\u7ecf\u8d85\u8fc7\u4e86 JS \u80fd\u8868\u793a\u7684\u8303\u56f4.<\/p>\n<p>NaN: \u8868\u793a\u5f53\u524d\u7684\u7ed3\u679c\u4e0d\u662f\u4e00\u4e2a\u6570\u5b57<\/p>\n<p> var max &#061; Number.MAX_VALUE;<br \/>\n\/\/ \u5f97\u5230 Infinity<br \/>\nconsole.log(max * 2);<br \/>\n\/\/ \u5f97\u5230 -Infinity<br \/>\nconsole.log(-max * 2);<br \/>\n\/\/ \u5f97\u5230 NaN<br \/>\nconsole.log(&#039;hehe&#039; &#8211; 10); <\/p>\n<p>\u4ee3\u7801\u5c55\u793a&#x1f447;<\/p>\n<p> &lt;!DOCTYPE html&gt;<br \/>\n&lt;html lang&#061;&#034;en&#034;&gt;<br \/>\n&lt;head&gt;<br \/>\n    &lt;meta charset&#061;&#034;UTF-8&#034;&gt;<br \/>\n    &lt;meta name&#061;&#034;viewport&#034; content&#061;&#034;width&#061;device-width, initial-scale&#061;1.0&#034;&gt;<br \/>\n    &lt;title&gt;Document&lt;\/title&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;script&gt;<br \/>\n        let a &#061; 10<br \/>\n        console.log(10\/0)<br \/>\n    &lt;\/script&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt; <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"561\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131808-6a9ac5109a7c3.png\" width=\"1915\" \/><\/p>\n<p>\u6211\u4eec\u53d1\u73b0&#xff0c;\u5982\u679c\u662f\u5728 Java \u4e2d&#xff0c;10 \/ 0 \u539f\u672c\u4f1a\u629b\u51fa\u5f02\u5e38\u7684\u4ee3\u7801&#xff0c;\u5728 JavaScript \u4e2d\u5374\u662f\u6253\u5370\u51fa\u4e86\u4e00\u4e2a Infinity<\/p>\n<p>\u8d1f\u65e0\u7a77\u65e0\u975e\u5c31\u662f\u5728\u524d\u9762\u52a0\u4e86\u4e2a\u201d &#8211; &#034;&#xff0c;\u8fd9\u91cc\u5c31\u4e0d\u6f14\u793a\u4e86<\/p>\n<p>\u4e0b\u9762\u6f14\u793a\u4e00\u4e0b NaN &#x1f447;<\/p>\n<p> &lt;!DOCTYPE html&gt;<br \/>\n&lt;html lang&#061;&#034;en&#034;&gt;<br \/>\n&lt;head&gt;<br \/>\n    &lt;meta charset&#061;&#034;UTF-8&#034;&gt;<br \/>\n    &lt;meta name&#061;&#034;viewport&#034; content&#061;&#034;width&#061;device-width, initial-scale&#061;1.0&#034;&gt;<br \/>\n    &lt;title&gt;Document&lt;\/title&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;script&gt;<br \/>\n        let a &#061; 10<br \/>\n        console.log(&#034;hahah&#034;-1)<br \/>\n    &lt;\/script&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt; <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"609\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131809-6a9ac51103ff4.png\" width=\"1916\" \/><\/p>\n<p>\u6ce8\u610f:<\/p>\n<p>1. \u8d1f\u65e0\u7a77\u5927 \u548c \u65e0\u7a77\u5c0f \u4e0d\u662f\u4e00\u56de\u4e8b. \u65e0\u7a77\u5c0f\u6307\u65e0\u9650\u8d8b\u8fd1\u4e0e 0, \u503c\u4e3a 1 \/ Infinity<\/p>\n<p>2. &#039;hehe&#039; &#043; 10 \u5f97\u5230\u7684\u4e0d\u662f NaN, \u800c\u662f &#039;hehe10&#039;, \u4f1a\u628a\u6570\u5b57\u9690\u5f0f\u8f6c\u6210\u5b57\u7b26\u4e32, \u518d\u8fdb\u884c\u5b57\u7b26\u4e32\u62fc\u63a5.<\/p>\n<p>3. \u53ef\u4ee5\u4f7f\u7528 isNaN \u51fd\u6570\u5224\u5b9a\u662f\u4e0d\u662f\u4e00\u4e2a\u975e\u6570\u5b57.<\/p>\n<p> console.log(isNaN(10)); \u00a0\/\/ false<br \/>\nconsole.log(isNaN(&#039;hehe&#039; &#8211; 10)); \u00a0\/\/ true <\/p>\n<h4 id=\"string%E5%AD%97%E7%AC%A6%E4%B8%B2%E7%B1%BB%E5%9E%8B\">string\u5b57\u7b26\u4e32\u7c7b\u578b<\/h4>\n<h5 id=\"%E5%9F%BA%E6%9C%AC%E8%A7%84%E5%88%99\">\u57fa\u672c\u89c4\u5219<\/h5>\n<p>\u5b57\u7b26\u4e32\u5b57\u9762\u503c\u9700\u8981\u4f7f\u7528\u5f15\u53f7\u5f15\u8d77\u6765, \u5355\u5f15\u53f7\u53cc\u5f15\u53f7\u5747\u53ef<\/p>\n<p> var a &#061; &#034;haha&#034;;<br \/>\nvar b &#061; &#039;hehe&#039;;<br \/>\nvar c &#061; hehe; \u00a0 \u00a0\/\/ \u8fd0\u884c\u51fa\u9519 <\/p>\n<p>\u5982\u679c\u5b57\u7b26\u4e32\u4e2d\u672c\u6765\u5df2\u7ecf\u5305\u542b\u5f15\u53f7\u548b\u529e?<\/p>\n<p> var msg &#061; &#034;My name is &#034;zhangsan&#034;&#034;; \u00a0 \u00a0\/\/ \u51fa\u9519<br \/>\nvar msg &#061; &#034;My name is \\\\&#034;zhangsan\\\\&#034;&#034;; \u00a0\/\/ \u6b63\u786e, \u4f7f\u7528\u8f6c\u4e49\u5b57\u7b26. \\\\&#034; \u6765\u8868\u793a\u5b57\u7b26\u4e32\u5185\u90e8\u7684\u5f15\u53f7.<br \/>\nvar msg &#061; &#034;My name is &#039;zhangsan&#039;&#034;; \u00a0 \u00a0\/\/ \u6b63\u786e, \u642d\u914d\u4f7f\u7528\u5355\u53cc\u5f15\u53f7<br \/>\nvar msg &#061; &#039;My name is &#034;zhangsan&#034;&#039;; \u00a0 \u00a0\/\/ \u6b63\u786e, \u642d\u914d\u4f7f\u7528\u5355\u53cc\u5f15\u53f7 <\/p>\n<p>\u4ee3\u7801\u5c55\u793a&#x1f447;<\/p>\n<p>         let a &#061; &#039;\u54c8\u54c8\u54c8&#039;<br \/>\n        a &#061; &#034;JS&#034;<br \/>\n        a &#061; &#039;\u54c8\u54c8\u54c8&#034;JS&#034;&#039;<br \/>\n        alert(a) <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"156\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131809-6a9ac5116faa5.png\" width=\"532\" \/><\/p>\n<p>\u5982\u679c\u5355\u5f15\u53f7\u548c\u53cc\u5f15\u53f7\u4e92\u6362\u4f4d\u7f6e&#xff0c;\u518d\u6765\u770b&#x1f447;<\/p>\n<p>         let a &#061; &#039;\u54c8\u54c8\u54c8&#039;<br \/>\n        a &#061; &#034;JS&#034;<br \/>\n        a &#061; &#034;\u54c8\u54c8\u54c8&#039;JS&#039;&#034;<br \/>\n        alert(a) <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"151\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131809-6a9ac511816a4.png\" width=\"540\" \/><\/p>\n<h5 id=\"%E8%BD%AC%E4%B9%89%E5%AD%97%E7%AC%A6\">\u8f6c\u4e49\u5b57\u7b26<\/h5>\n<p>\u6709\u4e9b\u5b57\u7b26\u4e0d\u65b9\u4fbf\u76f4\u63a5\u8f93\u5165, \u4e8e\u662f\u8981\u901a\u8fc7\u4e00\u4e9b\u7279\u6b8a\u65b9\u5f0f\u6765\u8868\u793a&#xff08;\u4e0e Java \u7c7b\u4f3c&#xff09;<\/p>\n<p> \\\\n<br \/>\n\\\\\\\\<br \/>\n\\\\&#039;<br \/>\n\\\\&#034;<br \/>\n\\\\t <\/p>\n<h5 id=\"%E6%B1%82%E9%95%BF%E5%BA%A6\">\u6c42\u957f\u5ea6<\/h5>\n<p>\u4f7f\u7528 String \u7684 length \u5c5e\u6027\u5373\u53ef<\/p>\n<p> var a &#061; &#039;hehe&#039;;<br \/>\nconsole.log(a.length);<br \/>\nvar b &#061; &#039;\u54c8\u54c8&#039;;<br \/>\nconsole.log(b.length); <\/p>\n<p>\u7ed3\u679c:<\/p>\n<p> 4<br \/>\n2 <\/p>\n<p>\u5355\u4f4d\u4e3a\u5b57\u7b26\u7684\u6570\u91cf<\/p>\n<h5 id=\"%E5%AD%97%E7%AC%A6%E4%B8%B2%E6%8B%BC%E6%8E%A5\">\u5b57\u7b26\u4e32\u62fc\u63a5<\/h5>\n<p>\u4f7f\u7528 &#043; \u8fdb\u884c\u62fc\u63a5<\/p>\n<p> var a &#061; &#034;my name is &#034;;<br \/>\nvar b &#061; &#034;CoderYanger&#034;;<br \/>\nconsole.log(a &#043; b); <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"555\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131809-6a9ac51193140.png\" width=\"1915\" \/><\/p>\n<p>\u6ce8\u610f, \u6570\u5b57\u548c\u5b57\u7b26\u4e32\u4e5f\u53ef\u4ee5\u8fdb\u884c\u62fc\u63a5<\/p>\n<p> var c &#061; &#034;my score is &#034;;<br \/>\nvar d &#061; 100;<br \/>\nconsole.log(c &#043; d); <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"582\" src=\"2026-09-04km3dd5fd5pi.png\" width=\"1918\" \/><\/p>\n<p>\u6ce8\u610f, \u8981\u8ba4\u51c6\u76f8\u52a0\u7684\u53d8\u91cf\u5230\u5e95\u662f\u5b57\u7b26\u4e32\u8fd8\u662f\u6570\u5b57<\/p>\n<p> console.log(100 &#043; 100); \u00a0 \u00a0 \/\/ 200<br \/>\nconsole.log(&#039;100&#039; &#043; 100); \u00a0 \/\/ 100100 <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"620\" src=\"2026-09-04yqxtakv32ug.png\" width=\"1919\" \/><\/p>\n<p>\u53ef\u89c1&#xff0c;\u6548\u679c\u4e0e Java \u662f\u7c7b\u4f3c\u7684~~<\/p>\n<h4 id=\"boolean%E5%B8%83%E5%B0%94%E7%B1%BB%E5%9E%8B\">boolean\u5e03\u5c14\u7c7b\u578b<\/h4>\n<p>\u8868\u793a &#034;\u771f&#034; \u548c &#034;\u5047&#034;<\/p>\n<p>boolean \u539f\u672c\u662f\u6570\u5b66\u4e2d\u7684\u6982\u5ff5 (\u5e03\u5c14\u4ee3\u6570).<\/p>\n<p>\u5728\u8ba1\u7b97\u673a\u4e2d boolean \u610f\u4e49\u91cd\u5927, \u5f80\u5f80\u8981\u642d\u914d\u6761\u4ef6\/\u5faa\u73af\u5b8c\u6210\u903b\u8f91\u5224\u65ad<\/p>\n<p>Boolean \u53c2\u4e0e\u8fd0\u7b97\u65f6\u5f53\u505a 1 \u548c 0 \u6765\u770b\u5f85<\/p>\n<p> console.log(true &#043; 1);<br \/>\nconsole.log(false &#043; 1) <\/p>\n<p>\u8fd9\u6837\u7684\u64cd\u4f5c\u5176\u5b9e\u662f\u4e0d\u79d1\u5b66\u7684. \u5b9e\u9645\u5f00\u53d1\u4e2d\u4e0d\u5e94\u8be5\u8fd9\u4e48\u5199<\/p>\n<p>\u4ee3\u7801\u5c55\u793a&#x1f447;<\/p>\n<p>         let a &#061; true<br \/>\n        console.log(typeof(a))<br \/>\n        a &#061; a &#043; 1<br \/>\n        console.log(&#034;a\u7684\u503c\u7b49\u4e8e&#034; &#043; a &#043; &#034;,a\u7684\u7c7b\u578b&#034; &#043; typeof(a)) <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"615\" src=\"2026-09-04arrsujbo0a5.png\" width=\"1919\" \/><\/p>\n<h4 id=\"undefined%E6%9C%AA%E5%AE%9A%E4%B9%89%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B\">undefined\u672a\u5b9a\u4e49\u6570\u636e\u7c7b\u578b<\/h4>\n<p>\u5982\u679c\u4e00\u4e2a\u53d8\u91cf\u6ca1\u6709\u88ab\u521d\u59cb\u5316\u8fc7, \u672a\u88ab\u5b9a\u4e49&#xff0c;\u7ed3\u679c\u5c31\u662f undefined, \u662f undefined \u7c7b\u578b<\/p>\n<p> let a;<br \/>\nconsole.log(a) <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"539\" src=\"2026-09-044nsvnit1tyj.png\" width=\"1919\" \/><\/p>\n<p>undefined \u548c\u5b57\u7b26\u4e32\u8fdb\u884c\u76f8\u52a0, \u7ed3\u679c\u8fdb\u884c\u5b57\u7b26\u4e32\u62fc\u63a5<\/p>\n<p> console.log(a &#043; &#034;10&#034;); \u00a0\/\/ undefined10 <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"543\" src=\"2026-09-04j3dajegtccd.png\" width=\"1910\" \/><\/p>\n<p>undefined \u548c\u6570\u5b57\u8fdb\u884c\u76f8\u52a0, \u7ed3\u679c\u4e3a NaN<\/p>\n<p> console.log(a &#043; 10);\/\/NaN<br \/>\nconsole.log(a &#043; true);\/\/NaN <\/p>\n<p>\u6548\u679c\u5c55\u793a\u4e0b&#x1f447;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"616\" src=\"2026-09-044xkmqrmgwnp.png\" width=\"1918\" \/><\/p>\n<h4 id=\"null%E7%A9%BA%E5%80%BC%E7%B1%BB%E5%9E%8B\">null\u7a7a\u503c\u7c7b\u578b<\/h4>\n<p>\u00a0null \u8868\u793a\u5f53\u524d\u7684\u53d8\u91cf\u662f\u4e00\u4e2a &#034;\u7a7a\u503c&#034;.<\/p>\n<p> var b &#061; null;<br \/>\nconsole.log(b &#043; 10); \u00a0 \u00a0\/\/ 10<br \/>\nconsole.log(b &#043; &#034;10&#034;); \u00a0\/\/ null10 <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"613\" src=\"2026-09-04tsjhoiqxcms.png\" width=\"1919\" \/><\/p>\n<p>\u6ce8\u610f: <\/p>\n<p>null \u548c undefined \u90fd\u8868\u793a\u53d6\u503c\u975e\u6cd5\u7684\u60c5\u51b5, \u4f46\u662f\u4fa7\u91cd\u70b9\u4e0d\u540c.<\/p>\n<p>null \u8868\u793a\u5f53\u524d\u7684\u503c\u4e3a\u7a7a. (\u76f8\u5f53\u4e8e\u6709\u4e00\u4e2a\u7a7a\u7684\u76d2\u5b50)<\/p>\n<p>undefined \u8868\u793a\u5f53\u524d\u7684\u53d8\u91cf\u672a\u5b9a\u4e49. (\u76f8\u5f53\u4e8e\u8fde\u76d2\u5b50\u90fd\u6ca1\u6709)<\/p>\n<h3 id=\"%E8%BF%90%E7%AE%97%E7%AC%A6\">\u8fd0\u7b97\u7b26<\/h3>\n<p>JavaScript \u4e2d\u7684\u8fd0\u7b97\u7b26\u548c Java \u7528\u6cd5\u57fa\u672c\u76f8\u540c. \u6b64\u5904\u4e0d\u505a\u8be6\u7ec6\u4ecb\u7ecd\u4e86.<\/p>\n<h4 id=\"%E7%AE%97%E6%9C%AF%E8%BF%90%E7%AE%97%E7%AC%A6\">\u7b97\u672f\u8fd0\u7b97\u7b26<\/h4>\n<p>&#043;<\/p>\n<p>&#8211;<\/p>\n<p>*<\/p>\n<p>\/<\/p>\n<p>%<\/p>\n<h4 id=\"%E8%B5%8B%E5%80%BC%E8%BF%90%E7%AE%97%E7%AC%A6%26%E5%A4%8D%E5%90%88%E8%B5%8B%E5%80%BC%E8%BF%90%E7%AE%97%E7%AC%A6\">\u8d4b\u503c\u8fd0\u7b97\u7b26&amp;\u590d\u5408\u8d4b\u503c\u8fd0\u7b97\u7b26<\/h4>\n<p>&#061;<\/p>\n<p>&#043;&#061;<\/p>\n<p>-&#061;<\/p>\n<p>*&#061;<\/p>\n<p>\/&#061;<\/p>\n<p>%&#061;<\/p>\n<h4 id=\"%E8%87%AA%E5%A2%9E%E8%87%AA%E5%87%8F%E8%BF%90%E7%AE%97%E7%AC%A6\">\u81ea\u589e\u81ea\u51cf\u8fd0\u7b97\u7b26<\/h4>\n<p>&#043;&#043;: \u81ea\u589e1<\/p>\n<p>&#8211;: \u81ea\u51cf<\/p>\n<h4 id=\"%E6%AF%94%E8%BE%83%E8%BF%90%E7%AE%97%E7%AC%A6\">\u6bd4\u8f83\u8fd0\u7b97\u7b26<\/h4>\n<p>&lt;<\/p>\n<p>&gt;<\/p>\n<p>&lt;&#061;<\/p>\n<p>&gt;&#061;<\/p>\n<p>&#061;&#061; \u6bd4\u8f83\u76f8\u7b49(\u4f1a\u8fdb\u884c\u9690\u5f0f\u7c7b\u578b\u8f6c\u6362)&#xff08;\u6bd4\u8f83\u7684\u662f\u53d8\u91cf\u7684\u5185\u5bb9&#xff09;<\/p>\n<p>!&#061;<\/p>\n<p>&#061;&#061;&#061; \u6bd4\u8f83\u76f8\u7b49(\u4e0d\u4f1a\u8fdb\u884c\u9690\u5f0f\u7c7b\u578b\u8f6c\u6362)&#xff08;\u6bd4\u8f83\u7684\u662f\u5185\u5bb9&#043;\u6570\u636e\u7c7b\u578b&#xff09;<\/p>\n<p>!&#061;&#061;<\/p>\n<p>\u4ee3\u7801\u5c55\u793a&#x1f447;<\/p>\n<p>         let a &#061; 10;<br \/>\n        let b &#061; &#034;10&#034;;<br \/>\n        alert(a&#061;&#061;b) <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"140\" src=\"2026-09-04lspf2tk2hu0.png\" width=\"529\" \/><\/p>\n<p>\u00a0\u4ee3\u7801\u5c55\u793a&#x1f447;<\/p>\n<p>         let a &#061; 10;<br \/>\n        let b &#061; &#034;10&#034;;<br \/>\n        alert(a&#061;&#061;&#061;b) <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"147\" src=\"2026-09-04hn051ifran3.png\" width=\"534\" \/><\/p>\n<h4 id=\"%E9%80%BB%E8%BE%91%E8%BF%90%E7%AE%97%E7%AC%A6\">\u903b\u8f91\u8fd0\u7b97\u7b26<\/h4>\n<p>\u7528\u4e8e\u8ba1\u7b97\u591a\u4e2a boolean \u8868\u8fbe\u5f0f\u7684\u503c.<\/p>\n<p>&amp;&amp; \u4e0e: \u4e00\u5047\u5219\u5047<\/p>\n<p>|| \u6216: \u4e00\u771f\u5219\u771f<\/p>\n<p>! \u975e<\/p>\n<h4 id=\"%E4%BD%8D%E8%BF%90%E7%AE%97\">\u4f4d\u8fd0\u7b97<\/h4>\n<p>&amp; \u6309\u4f4d\u4e0e<\/p>\n<p>| \u6309\u4f4d\u6216<\/p>\n<p>~ \u6309\u4f4d\u53d6\u53cd<\/p>\n<p>^ \u6309\u4f4d\u5f02\u6216<\/p>\n<h4 id=\"%E7%A7%BB%E4%BD%8D%E8%BF%90%E7%AE%97\">\u79fb\u4f4d\u8fd0\u7b97<\/h4>\n<p>&lt;&lt; \u5de6\u79fb<\/p>\n<p>&gt;&gt; \u6709\u7b26\u53f7\u53f3\u79fb(\u7b97\u672f\u53f3\u79fb)<\/p>\n<p>&gt;&gt;&gt; \u65e0\u7b26\u53f7\u53f3\u79fb(\u903b\u8f91\u53f3\u79fb)<\/p>\n<h3 id=\"%E6%9D%A1%E4%BB%B6%E8%AF%AD%E5%8F%A5\">\u6761\u4ef6\u8bed\u53e5<\/h3>\n<p>\u4e0e Java \u90fd\u662f\u4e00\u6837\u7684~~<\/p>\n<h4 id=\"if%E8%AF%AD%E5%8F%A5\">if\u8bed\u53e5<\/h4>\n<h5 id=\"%E5%9F%BA%E6%9C%AC%E8%AF%AD%E6%B3%95%E6%A0%BC%E5%BC%8F\">\u57fa\u672c\u8bed\u6cd5\u683c\u5f0f<\/h5>\n<p>\u6761\u4ef6\u8868\u8fbe\u5f0f\u4e3a true, \u5219\u6267\u884c if \u7684 { } \u4e2d\u7684\u4ee3\u7801<\/p>\n<p> \/\/ \u5f62\u5f0f1<br \/>\nif (\u6761\u4ef6) {<br \/>\n \u00a0 \u00a0\u8bed\u53e5<br \/>\n}<br \/>\n\/\/ \u5f62\u5f0f2<br \/>\nif (\u6761\u4ef6) {<br \/>\n \u00a0 \u00a0\u8bed\u53e51<br \/>\n} else {<br \/>\n \u00a0 \u00a0\u8bed\u53e52<br \/>\n}<br \/>\n\/\/ \u5f62\u5f0f3<br \/>\nif (\u6761\u4ef61) {<br \/>\n \u00a0 \u00a0\u8bed\u53e51<br \/>\n} else if (\u6761\u4ef62) {<br \/>\n \u00a0 \u00a0\u8bed\u53e52 \u00a0<br \/>\n} else if &#8230;. {<br \/>\n \u00a0 \u00a0\u8bed\u53e5&#8230;<br \/>\n} else {<br \/>\n \u00a0 \u00a0\u8bed\u53e5N<br \/>\n} <\/p>\n<h5 id=\"%E7%BB%83%E4%B9%A0%E6%A1%88%E4%BE%8B\">\u7ec3\u4e60\u6848\u4f8b<\/h5>\n<h5 id=\"%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B1%EF%BC%9A%E5%88%A4%E5%AE%9A%E4%B8%80%E4%B8%AA%E6%95%B0%E5%AD%97%E6%98%AF%E5%A5%87%E6%95%B0%E8%BF%98%E6%98%AF%E5%81%B6%E6%95%B0\">\u4ee3\u7801\u793a\u4f8b1&#xff1a;\u5224\u5b9a\u4e00\u4e2a\u6570\u5b57\u662f\u5947\u6570\u8fd8\u662f\u5076\u6570<\/h5>\n<p>         \/\/\u5224\u65ad\u5f53\u524d\u6570\u5b57\u662f\u5947\u6570\u8fd8\u662f\u5076\u6570<br \/>\n        let num &#061; prompt(&#034;\u8bf7\u8f93\u5165\u6570\u5b57&#034;)<br \/>\n        if(num%2&#061;&#061;0) alert(&#034;\u8fd9\u4e2a\u6570\u5b57\u662f\u5076\u6570&#034;)<br \/>\n        else if(num%2&#061;&#061;1) alert(&#034;\u8fd9\u4e2a\u6570\u5b57\u662f\u5947\u6570&#034;)<br \/>\n        else alert(&#034;\u975e\u6cd5\u8f93\u5165&#034;) <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"303\" src=\"2026-09-041lrhcga5rtx.png\" width=\"1597\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"211\" src=\"2026-09-04cng4b3botml.png\" width=\"1478\" \/><\/p>\n<p>\u6ce8\u610f! \u4e0d\u80fd\u5199\u6210 num % 2 &#061;&#061; 1 \u5c31\u662f\u5947\u6570. \u8d1f\u7684\u5947\u6570 % 2 \u7ed3\u679c\u53ef\u80fd\u662f -1.<\/p>\n<h5 id=\"%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B2%EF%BC%9A%E5%88%A4%E5%AE%9A%E4%B8%80%E4%B8%AA%E6%95%B0%E5%AD%97%E6%98%AF%E6%AD%A3%E6%95%B0%E8%BF%98%E6%98%AF%E8%B4%9F%E6%95%B0\">\u4ee3\u7801\u793a\u4f8b2&#xff1a;\u5224\u5b9a\u4e00\u4e2a\u6570\u5b57\u662f\u6b63\u6570\u8fd8\u662f\u8d1f\u6570<\/h5>\n<p> var num &#061; 10;<br \/>\nif (num &gt; 0) {<br \/>\n \u00a0 \u00a0console.log(&#034;num \u662f\u6b63\u6570&#034;);<br \/>\n} else if (num &lt; 0) {<br \/>\n \u00a0 \u00a0console.log(&#034;num \u662f\u8d1f\u6570&#034;);<br \/>\n} else {<br \/>\n \u00a0 \u00a0console.log(&#034;num \u662f 0&#034;);<br \/>\n} <\/p>\n<h5 id=\"%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B3%EF%BC%9A%E5%88%A4%E5%AE%9A%E6%9F%90%E4%B8%80%E5%B9%B4%E4%BB%BD%E6%98%AF%E5%90%A6%E6%98%AF%E9%97%B0%E5%B9%B4\">\u4ee3\u7801\u793a\u4f8b3&#xff1a;\u5224\u5b9a\u67d0\u4e00\u5e74\u4efd\u662f\u5426\u662f\u95f0\u5e74<\/h5>\n<p> var year &#061; 2000;<br \/>\nif (year % 100 &#061;&#061; 0) {<br \/>\n \u00a0 \u00a0\/\/ \u5224\u5b9a\u4e16\u7eaa\u95f0\u5e74<br \/>\n \u00a0 \u00a0if (year % 400 &#061;&#061; 0) {<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0console.log(&#034;\u662f\u95f0\u5e74&#034;);<br \/>\n \u00a0 } else {<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0console.log(&#034;\u4e0d\u662f\u95f0\u5e74&#034;);<br \/>\n \u00a0 }<br \/>\n} else {<br \/>\n \u00a0 \u00a0\/\/ \u666e\u901a\u95f0\u5e74<br \/>\n \u00a0 \u00a0if (year % 4 &#061;&#061; 0) {<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0console.log(&#034;\u662f\u95f0\u5e74&#034;);<br \/>\n \u00a0 } else {<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0console.log(&#034;\u4e0d\u662f\u95f0\u5e74&#034;);<br \/>\n \u00a0 }<br \/>\n} <\/p>\n<h4 id=\"%E4%B8%89%E5%85%83%E8%A1%A8%E8%BE%BE%E5%BC%8F\">\u4e09\u5143\u8868\u8fbe\u5f0f<\/h4>\n<p>\u662f if else \u7684\u7b80\u5316\u5199\u6cd5.<\/p>\n<p>\u6761\u4ef6 ? \u8868\u8fbe\u5f0f1 : \u8868\u8fbe\u5f0f2<\/p>\n<p>\u6761\u4ef6\u4e3a\u771f, \u8fd4\u56de\u8868\u8fbe\u5f0f1 \u7684\u503c. \u6761\u4ef6\u4e3a\u5047, \u8fd4\u56de\u8868\u8fbe\u5f0f2 \u7684\u503c.<\/p>\n<p>\u4ee3\u7801\u5c55\u793a&#x1f447;<\/p>\n<p> alert(1 &#061;&#061;&#061; &#034;1&#034;?true:false) <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"142\" src=\"2026-09-04p0gcypbcvqo.png\" width=\"537\" \/><\/p>\n<p>\u6ce8\u610f, \u4e09\u5143\u8868\u8fbe\u5f0f\u7684\u4f18\u5148\u7ea7\u662f\u6bd4\u8f83\u4f4e\u7684.<\/p>\n<h4 id=\"switch\">switch<\/h4>\n<p>\u66f4\u9002\u5408\u591a\u5206\u652f\u7684\u573a\u666f<\/p>\n<p> switch (\u8868\u8fbe\u5f0f) {<br \/>\n \u00a0 \u00a0case \u503c1:<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0\u8bed\u53e51;<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0break;<br \/>\n \u00a0 \u00a0case \u503c2:<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0\u8bed\u53e52:<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0break;<br \/>\n \u00a0 \u00a0default:<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0\u8bed\u53e5N;<br \/>\n} <\/p>\n<p>\u7528\u6237\u8f93\u5165\u4e00\u4e2a\u6574\u6570, \u63d0\u793a\u4eca\u5929\u662f\u661f\u671f\u51e0<\/p>\n<p> var day &#061; prompt(&#034;\u8bf7\u8f93\u5165\u4eca\u5929\u661f\u671f\u51e0: &#034;);\/\/\u9ed8\u8ba4\u662fstring\u7c7b\u578b<br \/>\nswitch (parseInt(day)) {\/\/\u6b64\u5904\u9700\u8981\u7528parseInt()\u8f6c\u6362\u6210\u6574\u6570&#xff0c;\u5426\u5219\u662fstring\u7c7b\u578b<br \/>\n \u00a0 \u00a0case 1:<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0console.log(&#034;\u661f\u671f\u4e00&#034;);<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0break;<br \/>\n \u00a0 \u00a0case 2:<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0console.log(&#034;\u661f\u671f\u4e8c&#034;);<br \/>\n\u00a0 \u00a0break;<br \/>\n \u00a0 \u00a0case 3:<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0console.log(&#034;\u661f\u671f\u4e09&#034;);<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0break;<br \/>\n \u00a0 \u00a0case 4:<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0console.log(&#034;\u661f\u671f\u56db&#034;);<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0break;<br \/>\n \u00a0 \u00a0case 5:<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0console.log(&#034;\u661f\u671f\u4e94&#034;);<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0break;<br \/>\n \u00a0 \u00a0case 6:<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0console.log(&#034;\u661f\u671f\u516d&#034;);<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0break;<br \/>\n \u00a0 \u00a0case 7:<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0console.log(&#034;\u661f\u671f\u65e5&#034;);<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0break;<br \/>\n \u00a0 \u00a0default:<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0console.log(&#034;\u8f93\u5165\u6709\u8bef&#034;);<br \/>\n} <\/p>\n<h5 id=\"%E8%B0%83%E8%AF%95%E6%8A%80%E5%B7%A7\"><span style=\"--darkreader-inline-color:#fe3a33;color:#fe2c24\">\u8c03\u8bd5\u6280\u5de7<\/span><\/h5>\n<p>\u2460\u70b9\u51fb\u884c\u53f7&#061;\u6253\u65ad\u70b9<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"969\" src=\"2026-09-04g5mhv45aodd.png\" width=\"1918\" \/><\/p>\n<p>\u2461\u5237\u65b0\u9875\u9762\u540e&#xff0c;\u8fdb\u5165 DeBug \u8c03\u8bd5\u6a21\u5f0f<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1018\" src=\"2026-09-04peuz5i1oqha.png\" width=\"1919\" \/><\/p>\n<p>\u2462\u5feb\u6377\u952e&#xff1a;<\/p>\n<p>F8&#xff1a;\u7ee7\u7eed\u8fd0\u884c<\/p>\n<p>F10&#xff1a;\u5355\u6b65\u8df3\u8fc7<\/p>\n<p>F11&#xff1a;\u5355\u6b65\u8fdb\u5165<\/p>\n<p>shift&#043;F11&#xff1a;\u5355\u6b65\u8df3\u51fa&#xff0c;\u7ed3\u675f\u8c03\u8bd5<\/p>\n<h3 id=\"%E5%BE%AA%E7%8E%AF%E8%AF%AD%E5%8F%A5\">\u5faa\u73af\u8bed\u53e5<\/h3>\n<p>\u91cd\u590d\u6267\u884c\u67d0\u4e9b\u8bed\u53e5<\/p>\n<h4 id=\"while%E5%BE%AA%E7%8E%AF\">while\u5faa\u73af<\/h4>\n<p> while (\u6761\u4ef6) {<br \/>\n \u00a0 \u00a0\u5faa\u73af\u4f53;<br \/>\n} <\/p>\n<p>\u6267\u884c\u8fc7\u7a0b:<\/p>\n<p>\u5148\u6267\u884c\u6761\u4ef6\u8bed\u53e5<\/p>\n<p>\u6761\u4ef6\u4e3a true, \u6267\u884c\u5faa\u73af\u4f53\u4ee3\u7801.<\/p>\n<p>\u6761\u4ef6\u4e3a false, \u76f4\u63a5\u7ed3\u675f\u5faa\u73af<\/p>\n<h5 id=\"%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B1%EF%BC%9A%E6%89%93%E5%8D%B01-10\">\u4ee3\u7801\u793a\u4f8b1&#xff1a;\u6253\u53701-10<\/h5>\n<p> var num &#061; 1;<br \/>\nwhile (num &lt;&#061; 10) {<br \/>\n \u00a0 \u00a0console.log(num);<br \/>\n \u00a0 \u00a0num&#043;&#043;;<br \/>\n} <\/p>\n<h5 id=\"%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B2%EF%BC%9A%E8%AE%A1%E7%AE%975%E7%9A%84%E9%98%B6%E4%B9%98\">\u4ee3\u7801\u793a\u4f8b2&#xff1a;\u8ba1\u7b975\u7684\u9636\u4e58<\/h5>\n<p> var result &#061; 1;<br \/>\nvar i &#061; 1;<br \/>\nwhile (i &lt;&#061; 5) {<br \/>\n \u00a0 \u00a0result *&#061; i;<br \/>\n \u00a0 \u00a0i&#043;&#043;;<br \/>\n}<br \/>\nconsole.log(result) <\/p>\n<h4 id=\"continue\">continue<\/h4>\n<p>\u7ed3\u675f\u8fd9\u6b21\u5faa\u73af<\/p>\n<p>\u00a0\u5403\u4e94\u4e2a\u674e\u5b50, \u53d1\u73b0\u7b2c\u4e09\u4e2a\u674e\u5b50\u91cc\u6709\u4e00\u53ea\u866b\u5b50, \u4e8e\u662f\u6254\u6389\u8fd9\u4e2a, \u7ee7\u7eed\u5403\u4e0b\u4e00\u4e2a\u674e\u5b50<\/p>\n<p> var i &#061; 1;<br \/>\nwhile (i &lt;&#061; 5) {<br \/>\n \u00a0 \u00a0if (i &#061;&#061; 3) {<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0i&#043;&#043;;<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0continue;<br \/>\n \u00a0 }<br \/>\n \u00a0 \u00a0console.log(&#034;\u6211\u5728\u5403\u7b2c&#034; &#043; i &#043; &#034;\u4e2a\u674e\u5b50&#034;);<br \/>\n \u00a0 \u00a0i&#043;&#043;;<br \/>\n} <\/p>\n<p>\u6211\u5728\u5403\u7b2c1\u4e2a\u674e\u5b50<\/p>\n<p>\u6211\u5728\u5403\u7b2c2\u4e2a\u674e\u5b50<\/p>\n<p>\u6211\u5728\u5403\u7b2c4\u4e2a\u674e\u5b50<\/p>\n<p>\u6211\u5728\u5403\u7b2c5\u4e2a\u674e\u5b50<\/p>\n<h5 id=\"%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B%EF%BC%9A%E6%89%BE%E5%88%B0100-200%E4%B8%AD%E6%89%80%E6%9C%893%E7%9A%84%E5%80%8D%E6%95%B0\">\u4ee3\u7801\u793a\u4f8b&#xff1a;\u627e\u5230100-200\u4e2d\u6240\u67093\u7684\u500d\u6570<\/h5>\n<p> var num &#061; 100;<br \/>\nwhile (num &lt;&#061; 200) {<br \/>\n \u00a0 \u00a0if (num % 3 !&#061; 0) {<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0num&#043;&#043;; \u00a0\/\/ \u8fd9\u91cc\u7684 &#043;&#043; \u4e0d\u8981\u5fd8\u8bb0! \u5426\u5219\u4f1a\u6b7b\u5faa\u73af.<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0continue;<br \/>\n \u00a0 }<br \/>\n \u00a0 \u00a0console.log(&#034;\u627e\u5230\u4e86 3 \u7684\u500d\u6570, \u4e3a:&#034; &#043; num);<br \/>\n \u00a0 \u00a0num&#043;&#043;;<br \/>\n} <\/p>\n<h4 id=\"break\">break<\/h4>\n<p>\u7ed3\u675f\u6574\u4e2a\u5faa\u73af<\/p>\n<p>\u5403\u4e94\u4e2a\u674e\u5b50, \u53d1\u73b0\u7b2c\u4e09\u4e2a\u674e\u5b50\u91cc\u6709\u534a\u4e2a\u866b\u5b50, \u4e8e\u662f\u5269\u4e0b\u7684\u4e5f\u4e0d\u5403\u4e86<\/p>\n<h5 id=\"%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B%EF%BC%9A%E6%89%BE%E5%88%B0100-200%E4%B8%AD%E7%AC%AC%E4%B8%80%E4%B8%AA3%E7%9A%84%E5%80%8D%E6%95%B0\">\u4ee3\u7801\u793a\u4f8b&#xff1a;\u627e\u5230100-200\u4e2d\u7b2c\u4e00\u4e2a3\u7684\u500d\u6570<\/h5>\n<p> var i &#061; 1;<br \/>\nwhile (i &lt;&#061; 5) {<br \/>\n \u00a0 \u00a0if (i &#061;&#061; 3) {<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0break;<br \/>\n \u00a0 }<br \/>\n \u00a0 \u00a0console.log(&#034;\u6211\u5728\u5403\u7b2c&#034; &#043; i &#043; &#034;\u4e2a\u674e\u5b50&#034;);<br \/>\n \u00a0 \u00a0i&#043;&#043;;<br \/>\n} <\/p>\n<p>\u6211\u5728\u5403\u7b2c1\u4e2a\u674e\u5b50<\/p>\n<p>\u6211\u5728\u5403\u7b2c2\u4e2a\u674e\u5b50<\/p>\n<h4 id=\"for%E5%BE%AA%E7%8E%AF\">for\u5faa\u73af<\/h4>\n<p> for (\u8868\u8fbe\u5f0f1; \u8868\u8fbe\u5f0f2; \u8868\u8fbe\u5f0f3) {<br \/>\n \u5faa\u73af\u4f53<br \/>\n} <\/p>\n<p>\u8868\u8fbe\u5f0f1: \u7528\u4e8e\u521d\u59cb\u5316\u5faa\u73af\u53d8\u91cf.<\/p>\n<p>\u8868\u8fbe\u5f0f2: \u5faa\u73af\u6761\u4ef6<\/p>\n<p>\u8868\u8fbe\u5f0f3: \u66f4\u65b0\u5faa\u73af\u53d8\u91cf.<\/p>\n<p>\u6267\u884c\u8fc7\u7a0b:<\/p>\n<p>\u5148\u6267\u884c\u8868\u8fbe\u5f0f1, \u521d\u59cb\u5316\u5faa\u73af\u53d8\u91cf<\/p>\n<p>\u518d\u6267\u884c\u8868\u8fbe\u5f0f2, \u5224\u5b9a\u5faa\u73af\u6761\u4ef6<\/p>\n<p>\u5982\u679c\u6761\u4ef6\u4e3a false, \u7ed3\u675f\u5faa\u73af<\/p>\n<p>\u5982\u679c\u6761\u4ef6\u4e3a true, \u5219\u6267\u884c\u5faa\u73af\u4f53\u4ee3\u7801.<\/p>\n<p>\u6267\u884c\u8868\u8fbe\u5f0f3 \u66f4\u65b0\u5faa\u73af\u53d8\u91cf<\/p>\n<h5 id=\"%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B1%EF%BC%9A%E6%89%93%E5%8D%B01-10%E7%9A%84%E6%95%B0%E5%AD%97\">\u4ee3\u7801\u793a\u4f8b1&#xff1a;\u6253\u53701-10\u7684\u6570\u5b57<\/h5>\n<p> for (var num &#061; 1; num &lt;&#061; 10; num&#043;&#043;) {<br \/>\n \u00a0 \u00a0console.log(num);<br \/>\n} <\/p>\n<h5 id=\"%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B2%EF%BC%9A%E8%AE%A1%E7%AE%975%E7%9A%84%E9%98%B6%E4%B9%98\">\u4ee3\u7801\u793a\u4f8b2&#xff1a;\u8ba1\u7b975\u7684\u9636\u4e58<\/h5>\n<p> var result &#061; 0;<br \/>\nfor (var i &#061; 1; i &lt;&#061; 5; i&#043;&#043;) {<br \/>\n \u00a0 \u00a0result *&#061; i;<br \/>\n}<br \/>\nconsole.log(&#034;result &#061; &#034; &#043; result); <\/p>\n<p>\u4ee3\u7801\u793a\u4f8b&#x1f447;<\/p>\n<p>         for(i &#061; 100;i &lt;&#061; 200; i&#043;&#043;){<br \/>\n            if(i%3&#061;&#061;0)<br \/>\n                break;<br \/>\n        }<br \/>\n        alert(&#034;100~200\u4e4b\u95f4\u7b2c\u4e00\u4e2a3\u7684\u500d\u6570\u662f&#034;&#043;i) <\/p>\n<p>\u6548\u679c\u5c55\u793a&#x1f447;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"156\" src=\"2026-09-04wmskodu0ls0.png\" width=\"546\" \/><\/p>\n<p>\u7ec6\u8282&#xff1a;\u5f53\u5728 i \u524d\u9762\u52a0\u4e0a let \u65f6 i \u7684\u4f5c\u7528\u57df\u5c31\u4ece\u5168\u5c40\u53d8\u6210\u5c40\u90e8\u4e86&#xff0c;\u65e0\u6cd5\u6b63\u5e38\u8f93\u51fa\u4e86&#x1f447;<\/p>\n<p>         for(let i &#061; 100;i &lt;&#061; 200; i&#043;&#043;){<br \/>\n            if(i%3&#061;&#061;0)<br \/>\n                break;<br \/>\n        }<br \/>\n        alert(&#034;100~200\u4e4b\u95f4\u7b2c\u4e00\u4e2a3\u7684\u500d\u6570\u662f&#034;&#043;i) <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"485\" src=\"2026-09-04rgmr0tchznj.png\" width=\"1919\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u5f55<br \/>\n\u521d\u8bc6JavaScript<br \/>\nJavaScript\u662f\u4ec0\u4e48<br \/>\n\u53d1\u5c55\u5386\u53f2<br \/>\nJavaScript\u548cHTML\u548cCSS\u4e4b\u95f4\u7684\u5173\u7cfb<br \/>\nJavaScript\u8fd0\u884c\u8fc7\u7a0b<br \/>\nJavaScript\u7684\u7ec4\u6210<br \/>\n\u91cd\u8981\u6982\u5ff5: ECMAScript<br \/>\n\u524d\u7f6e\u77e5\u8bc6<br \/>\n\u7b2c\u4e00\u4e2a\u7a0b\u5e8f<br \/>\nJavaScript\u7684\u4e66\u5199\u5f62\u5f0f<br \/>\n\u884c\u5185\u5f0f<br \/>\n\u5185\u5d4c\u5f0f<br \/>\n\u5916\u90e8\u5f0f<br \/>\n\u6ce8\u91ca<br \/>\n\u8f93\u5165\u8f93\u51fa<br \/>\n\u8f93\u5165&#xff1a;prompt<br \/>\n\u8f93\u51fa&#xff1a;alert<br \/>\n\u8f93\u51fa&#xff1a;console.log<br \/>\n\u91cd\u8981\u6982\u5ff5&#xff1a;\u65e5<\/p>\n","protected":false},"author":2,"featured_media":100578,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[10655,99,187,87,190,427],"topic":[],"class_list":["post-100598","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-agent","tag-java","tag-javascript","tag-87","tag-190","tag-427"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u524d\u7aef\u57fa\u7840\u2014\u2014JavaScript\uff08\u57fa\u7840\u8bed\u6cd5\uff09\uff08\u4e0a\u7bc7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/100598.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u524d\u7aef\u57fa\u7840\u2014\u2014JavaScript\uff08\u57fa\u7840\u8bed\u6cd5\uff09\uff08\u4e0a\u7bc7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u76ee\u5f55 \u521d\u8bc6JavaScript JavaScript\u662f\u4ec0\u4e48 \u53d1\u5c55\u5386\u53f2 JavaScript\u548cHTML\u548cCSS\u4e4b\u95f4\u7684\u5173\u7cfb JavaScript\u8fd0\u884c\u8fc7\u7a0b JavaScript\u7684\u7ec4\u6210 \u91cd\u8981\u6982\u5ff5: ECMAScript \u524d\u7f6e\u77e5\u8bc6 \u7b2c\u4e00\u4e2a\u7a0b\u5e8f JavaScript\u7684\u4e66\u5199\u5f62\u5f0f \u884c\u5185\u5f0f \u5185\u5d4c\u5f0f \u5916\u90e8\u5f0f \u6ce8\u91ca \u8f93\u5165\u8f93\u51fa \u8f93\u5165&#xff1a;prompt \u8f93\u51fa&#xff1a;alert \u8f93\u51fa&#xff1a;console.log \u91cd\u8981\u6982\u5ff5&#xff1a;\u65e5\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/100598.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-04T13:18:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131802-6a9ac50aa924f.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/100598.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/100598.html\",\"name\":\"\u524d\u7aef\u57fa\u7840\u2014\u2014JavaScript\uff08\u57fa\u7840\u8bed\u6cd5\uff09\uff08\u4e0a\u7bc7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-04T13:18:11+00:00\",\"dateModified\":\"2026-09-04T13:18:11+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/100598.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/100598.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/100598.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u524d\u7aef\u57fa\u7840\u2014\u2014JavaScript\uff08\u57fa\u7840\u8bed\u6cd5\uff09\uff08\u4e0a\u7bc7\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u524d\u7aef\u57fa\u7840\u2014\u2014JavaScript\uff08\u57fa\u7840\u8bed\u6cd5\uff09\uff08\u4e0a\u7bc7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/100598.html","og_locale":"zh_CN","og_type":"article","og_title":"\u524d\u7aef\u57fa\u7840\u2014\u2014JavaScript\uff08\u57fa\u7840\u8bed\u6cd5\uff09\uff08\u4e0a\u7bc7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u76ee\u5f55 \u521d\u8bc6JavaScript JavaScript\u662f\u4ec0\u4e48 \u53d1\u5c55\u5386\u53f2 JavaScript\u548cHTML\u548cCSS\u4e4b\u95f4\u7684\u5173\u7cfb JavaScript\u8fd0\u884c\u8fc7\u7a0b JavaScript\u7684\u7ec4\u6210 \u91cd\u8981\u6982\u5ff5: ECMAScript \u524d\u7f6e\u77e5\u8bc6 \u7b2c\u4e00\u4e2a\u7a0b\u5e8f JavaScript\u7684\u4e66\u5199\u5f62\u5f0f \u884c\u5185\u5f0f \u5185\u5d4c\u5f0f \u5916\u90e8\u5f0f \u6ce8\u91ca \u8f93\u5165\u8f93\u51fa \u8f93\u5165&#xff1a;prompt \u8f93\u51fa&#xff1a;alert \u8f93\u51fa&#xff1a;console.log \u91cd\u8981\u6982\u5ff5&#xff1a;\u65e5","og_url":"https:\/\/www.wsisp.com\/helps\/100598.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-04T13:18:11+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260904131802-6a9ac50aa924f.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"8 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/100598.html","url":"https:\/\/www.wsisp.com\/helps\/100598.html","name":"\u524d\u7aef\u57fa\u7840\u2014\u2014JavaScript\uff08\u57fa\u7840\u8bed\u6cd5\uff09\uff08\u4e0a\u7bc7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-04T13:18:11+00:00","dateModified":"2026-09-04T13:18:11+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/100598.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/100598.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/100598.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u524d\u7aef\u57fa\u7840\u2014\u2014JavaScript\uff08\u57fa\u7840\u8bed\u6cd5\uff09\uff08\u4e0a\u7bc7\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/100598","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=100598"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/100598\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/100578"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=100598"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=100598"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=100598"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=100598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}