{"id":14877,"date":"2020-04-27T12:21:58","date_gmt":"2020-04-27T12:21:58","guid":{"rendered":"https:\/\/itteacheritfreelance.hk\/wordpress\/?p=14877"},"modified":"2020-04-27T14:21:29","modified_gmt":"2020-04-27T14:21:29","slug":"javascript-code-study-education-use","status":"publish","type":"post","link":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/2020\/04\/27\/javascript-code-study-education-use\/","title":{"rendered":"JavaScript -\u6559\u80b2 \u5b66\u751f \u88dc\u7fd2 >> \u7528\u6cd5"},"content":{"rendered":"\n<p> \u672c\u7ae0 \u5e0c\u671b \u6559\u80b2 \u5b66\u751f JavaScript \u7684\u76f8\u95dc\u77e5\u8b58, \u5e6b \u5b78\u751f \u88dc\u7fd2 study.  <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u74b0\u5883\u5efa\u7f6e\">JavaScript -\u6559\u80b2 \u5b66\u751f \u88dc\u7fd2 &gt;&gt; \u7528\u6cd5&gt;&gt; \u74b0\u5883\u5efa\u7f6e<\/h2>\n\n\n\n<p>JavaScript \u7684\u6a94\u6848\u53ea\u8981\u4f7f\u7528\u4e00\u822c\u7684\u6587\u5b57\u7de8\u8f2f\u5668\u5373\u53ef\u7de8\u8f2f\uff08\u5b58\u6210 .js \u6a94\u6848\uff09\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/www.sublimetext.com\/\" target=\"_blank\">Sublime Text<\/a>&nbsp;\u7b49\u7de8\u8f2f\u5668\u9032\u884c\u958b\u767c\uff0c<a rel=\"noreferrer noopener\" href=\"https:\/\/jsbin.com\/\" target=\"_blank\">JSBin<\/a>&nbsp;\u9019\u500b\u7dda\u4e0a\u5de5\u5177\u9032\u884c\u6e2c\u8a66\uff08\u7576\u7136\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528 Chrome\u3001Firefox \u7b49\u700f\u89bd\u5668\u7684\u958b\u767c\u8005\u5de5\u5177\uff09\u3002\u9664\u4e86\u7de8\u8f2f\u5668\u5916\uff0c\u5be6\u969b\u958b\u767c\u4e0a\u6211\u5011\u4e5f\u6703\u9700\u8981\u7528\u5230&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/nodejs.org\/en\/\" target=\"_blank\">Node.js \u958b\u767c\u74b0\u5883<\/a>&nbsp;\u548c NPM \u5957\u4ef6\u7ba1\u7406\u7cfb\u7d71\uff08\u6309\u7167 Node.js \u5b98\u65b9\u6307\u793a\u5373\u53ef\u5b89\u88dd\uff09\u3002Node.js \u662f\u4e00\u500b\u958b\u653e\u539f\u59cb\u78bc\u3001\u8de8\u5e73\u53f0\u7684\u3001\u53ef\u7528\u65bc\u4f3a\u670d\u5668\u7aef\u548c\u7db2\u8def\u61c9\u7528\u7684\u57f7\u884c\u74b0\u5883\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/itteacheritfreelance.hk\/wordpress\/wp-content\/uploads\/2020\/04\/Javascript-Education-Learning-Study-2-.jpg\" alt=\"JavaScript ,code, coding,\u7a0b\u5e8f\u8bbe\u8ba1, \u7535\u5b50\u8ba1\u7b97\u673a,\u6559\u80b2,IT,\u96fb\u8166\u73ed, \u6559\u80b2, student,\u5b66\u751f, \u8f85\u5bfc,\u5b66\u4e60,study, Computer, teacher,mobile, Android ,learn, tutor,\u5728\u7ebf\u5b66\u4e60, \u6559\u5b66, \u540c\u5b66,\u540c\u5b78, \u7535\u5b50\u8ba1\u7b97\u673a,\u6559\u80b2,IT, typescript,\u96fb\u8166\u73ed, \u88dc\u7fd2, \u8bfe\u7a0b,\u8ab2\u7a0b, \u52a9\u6559, \u5bb6\u6559, \u88dc\u7fd2\u6559\u5b78, \u9ad8\u7ea7\u8bed\u8a00, \u7a0b\u5f0f\u7f16\u5199, \u7a0b\u5f0f\u7de8\u5beb, \u5174\u8da3\u73ed, \u8208\u8da3\u73ed, \u4fe1\u606f\u6280\u672f, \u7a0b\u5e8f\u8bbe\u8ba1, \u79fb\u52a8\u7535\u8bdd, \u7535\u5b50\u8ba1\u7b97\u5668, \u4fe1\u606f, C++, Java, Python, JavaScript, MySQL, Server, CSS, HTML,\u8ba1\u7b97\u673a, \u96fb\u8166, #freelance, programming, \u79c1\u4eba\u8001\u5e08,\u79c1\u4eba\u8001\u5e2b, \u96fb\u8166\u8ab2\u7a0b, \u8cc7\u8a0a\u79d1\u6280, \u4e2d\u5b66,\u4e2d\u5b78, \u81ea\u7531\u804c\u4e1a,\u81ea\u7531\u8077\u696d, \u81ea\u7531\u5de5\u4f5c, IT freelance\" class=\"wp-image-14825\" width=\"370\" height=\"433\"\/><figcaption>JavaScript-\u6559\u80b2-\u5b78\u751f-\u88dc\u7fd2<\/figcaption><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">&lt;script&gt; \u6807\u7b7e<\/h3>\n\n\n\n<p>\u5728 HTML \u4e2d\uff0cJavaScript \u4ee3\u7801\u5fc5\u987b\u4f4d\u4e8e&nbsp;&lt;script&gt;&nbsp;\u4e0e&nbsp;&lt;\/script&gt;&nbsp;\u6807\u7b7e\u4e4b\u95f4\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u5b9e\u4f8b<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;script&gt;\ndocument.getElementById(\"demo\").innerHTML = \"\u6211\u7684\u7b2c\u4e00\u6bb5 JavaScript\";\n&lt;\/script&gt;<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">JavaScript -\u6559\u80b2 \u5b66\u751f \u88dc\u7fd2 &gt;&gt; \u7528\u6cd5&gt;&gt; JavaScript \u51fd\u6570\u548c\u4e8b\u4ef6<\/h2>\n\n\n\n<p>JavaScript&nbsp;<em>\u51fd\u6570<\/em>\u662f\u4e00\u79cd JavaScript \u4ee3\u7801\u5757\uff0c\u5b83\u53ef\u4ee5\u5728\u8c03\u7528\u65f6\u88ab\u6267\u884c\u3002<\/p>\n\n\n\n<p>\u4f8b\u5982\uff0c\u5f53\u53d1\u751f<em>\u4e8b\u4ef6<\/em>\u65f6\u8c03\u7528\u51fd\u6570\uff0c\u6bd4\u5982\u5f53\u7528\u6237\u70b9\u51fb\u6309\u94ae\u65f6\u3002<\/p>\n\n\n\n<p><strong>\u63d0\u793a\uff1a<\/strong>\u60a8\u5c06\u5728\u7a0d\u540e\u7684\u7ae0\u8282\u5b66\u5230\u66f4\u591a\u6709\u5173\u51fd\u6570\u548c\u4e8b\u4ef6\u7684\u77e5\u8bc6\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">  JavaScript -\u6559\u80b2 \u5b66\u751f \u88dc\u7fd2 &gt;&gt; \u7528\u6cd5&gt;&gt;  &lt;head&gt; \u6216 &lt;body&gt; \u4e2d\u7684 JavaScript<\/h2>\n\n\n\n<p>\u60a8\u80fd\u591f\u5728 HTML \u6587\u6863\u4e2d\u653e\u7f6e\u4efb\u610f\u6570\u91cf\u7684\u811a\u672c\u3002<\/p>\n\n\n\n<p>\u811a\u672c\u53ef\u88ab\u653e\u7f6e\u4e0e HTML \u9875\u9762\u7684&nbsp;&lt;body&gt;&nbsp;\u6216&nbsp;&lt;head&gt;&nbsp;\u90e8\u5206\u4e2d\uff0c\u6216\u517c\u800c\u6709\u4e4b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">&lt;head&gt; \u4e2d\u7684 JavaScript<\/h3>\n\n\n\n<p>\u5728\u672c\u4f8b\u4e2d\uff0cJavaScript \u51fd\u6570\u88ab\u653e\u7f6e\u4e8e HTML \u9875\u9762\u7684&nbsp;&lt;head&gt;&nbsp;\u90e8\u5206\u3002<\/p>\n\n\n\n<p>\u8be5\u51fd\u6570\u4f1a\u5728\u6309\u94ae\u88ab\u70b9\u51fb\u65f6\u8c03\u7528\uff1a<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u5b9e\u4f8b<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n&lt;script&gt;\nfunction myFunction() {\n    document.getElementById(\"demo\").innerHTML = \"\u6bb5\u843d\u88ab\u66f4\u6539\u3002\";\n}\n&lt;\/script&gt;\n&lt;\/head&gt;\n\n&lt;body&gt;\n\n&lt;h1&gt;\u4e00\u5f20\u7f51\u9875&lt;\/h1&gt;\n&lt;p id=\"demo\"&gt;\u4e00\u4e2a\u6bb5\u843d&lt;\/p&gt;\n&lt;button type=\"button\" onclick=\"myFunction()\"&gt;\u8bd5\u4e00\u8bd5&lt;\/button&gt;\n\n&lt;\/body&gt;\n&lt;\/html&gt;<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">&lt;body&gt; \u4e2d\u7684 JavaScript<\/h3>\n\n\n\n<p>\u5728\u672c\u4f8b\u4e2d\uff0cJavaScript \u4f1a\u5728\u9875\u9762\u52a0\u8f7d\u65f6\u5411 HTML \u7684 &lt;body&gt; \u5199\u6587\u672c\uff1a<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u5b9e\u4f8b<\/h4>\n\n\n\n<p>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;body&gt; . . &lt;script&gt; document.write(&#8220;&lt;h1&gt;\u8fd9\u662f\u4e00\u4e2a\u6807\u9898&lt;\/h1&gt;&#8221;); document.write(&#8220;&lt;p&gt;\u8fd9\u662f\u4e00\u4e2a\u6bb5\u843d&lt;\/p&gt;&#8221;); &lt;\/script&gt; . . &lt;\/body&gt; &lt;\/html&gt; <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"> JavaScript -\u6559\u80b2 \u5b66\u751f \u88dc\u7fd2 &gt;&gt; \u7528\u6cd5&gt;&gt; \u5916\u90e8\u7684 JavaScript<\/h2>\n\n\n\n<p>\u4e5f\u53ef\u4ee5\u628a\u811a\u672c\u4fdd\u5b58\u5230\u5916\u90e8\u6587\u4ef6\u4e2d\u3002\u5916\u90e8\u6587\u4ef6\u901a\u5e38\u5305\u542b\u88ab\u591a\u4e2a\u7f51\u9875\u4f7f\u7528\u7684\u4ee3\u7801\u3002<\/p>\n\n\n\n<p>\u5916\u90e8 JavaScript \u6587\u4ef6\u7684\u6587\u4ef6\u6269\u5c55\u540d\u662f .js\u3002<\/p>\n\n\n\n<p>\u5982\u9700\u4f7f\u7528\u5916\u90e8\u6587\u4ef6\uff0c\u8bf7\u5728 &lt;script&gt; \u6807\u7b7e\u7684 &#8220;src&#8221; \u5c5e\u6027\u4e2d\u8bbe\u7f6e\u8be5 .js \u6587\u4ef6\uff1a<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u5b9e\u4f8b<\/h4>\n\n\n\n<p>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;body&gt; &lt;script src=&#8221;myScript.js&#8221;&gt;&lt;\/script&gt; &lt;\/body&gt; &lt;\/html&gt; <\/p>\n\n\n\n<p>\u4f60\u53ef\u4ee5\u5c06\u811a\u672c\u653e\u7f6e\u4e8e &lt;head&gt; \u6216\u8005 &lt;body&gt;\u4e2d\uff0c\u653e\u5728 &lt;script&gt; \u6807\u7b7e\u4e2d\u7684\u811a\u672c\u4e0e\u5916\u90e8\u5f15\u7528\u7684\u811a\u672c\u8fd0\u884c\u6548\u679c\u5b8c\u5168\u4e00\u81f4\u3002<br><\/p>\n\n\n\n<p>myScript.js \u6587\u4ef6\u4ee3\u7801\u5982\u4e0b\uff1afunction myFunction()\n{\n    document.getElementById(&#8220;demo&#8221;).innerHTML=&#8221;\u6211\u7684\u7b2c\u4e00\u4e2a JavaScript \u51fd\u6570&#8221;;\n}<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"\"><tbody><tr><th><\/th><td>\u5916\u90e8\u811a\u672c\u4e0d\u80fd\u5305\u542b &lt;script&gt; \u6807\u7b7e\u3002<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>\u6ce8\u610f\u7ec6\u8282\uff1a<\/strong><\/p>\n\n\n\n<p>1\u3001\u5728\u6807\u7b7e\u4e2d\u586b\u5199 onclick \u4e8b\u4ef6\u8c03\u7528\u51fd\u6570\u65f6\uff0c\u4e0d\u662f&nbsp;<strong>onclick=\u51fd\u6570\u540d<\/strong>\uff0c \u800c\u662f&nbsp;<strong>onclick=\u51fd\u6570\u540d+()<\/strong>\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;script&gt; \n&nbsp;&nbsp;&nbsp;&nbsp;function myfunction(){\n&nbsp;&nbsp;&nbsp;&nbsp;     document.getElementById(\"demo\").innerHTML=\"onclick\u4e8b\u4ef6\u89e6\u53d1\";\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&lt;\/script&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/head&gt;\n&lt;body&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;h1 id=\"demo\"&gt;\u4e00\u4e2a\u6bb5\u843d&lt;\/h1&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;button onclick=\"myfunction()\" type=\"button\"&gt;\u70b9\u51fb\u8fd9\u91cc&lt;\/button&gt;\n&lt;\/body&gt;<\/pre>\n\n\n\n<p>2\u3001\u5916\u90e8 javascript \u6587\u4ef6\u4e0d\u4f7f\u7528&nbsp;<strong>&lt;script&gt;<\/strong>&nbsp;\u6807\u7b7e\uff0c\u76f4\u63a5\u5199 javascript \u4ee3\u7801\u3002<\/p>\n\n\n\n<p>3\u3001HTML \u8f93\u51fa\u6d41\u4e2d\u4f7f\u7528 document.write\uff0c\u76f8\u5f53\u4e8e\u6dfb\u52a0\u5728\u539f\u6709html\u4ee3\u7801\u4e2d\u6dfb\u52a0\u4e00\u4e32html\u4ee3\u7801\u3002\u800c\u5982\u679c\u5728\u6587\u6863\u52a0\u8f7d\u540e\u4f7f\u7528\uff08\u5982\u4f7f\u7528\u51fd\u6570\uff09\uff0c\u4f1a\u8986\u76d6\u6574\u4e2a\u6587\u6863\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528\u51fd\u6570\u6765\u6267\u884cdocument.write\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;script&gt;\nfunction myfunction(){\n&nbsp;&nbsp;&nbsp;&nbsp;document.write(\"\u4f7f\u7528\u51fd\u6570\u6765\u6267\u884cdoucment.write\uff0c\u5373\u5728\u6587\u6863\u52a0\u8f7d\u540e\u518d\u6267\u884c\u8fd9\u4e2a\u64cd\u4f5c\uff0c\u4f1a\u5b9e\u73b0\u6587\u6863\u8986\u76d6\");\n}\ndocument.write(\"&lt;h1&gt;\u8fd9\u662f\u4e00\u4e2a\u6807\u9898&lt;\/h1&gt;\");\ndocument.write(\"&lt;p&gt;\u8fd9\u662f\u4e00\u4e2a\u6bb5\u843d\u3002&lt;\/p&gt;\");\n&lt;\/script&gt;\n&lt;p &gt;\n\u60a8\u53ea\u80fd\u5728 HTML \u8f93\u51fa\u6d41\u4e2d\u4f7f\u7528 &lt;strong&gt;document.write&lt;\/strong&gt;\u3002\n\u5982\u679c\u60a8\u5728\u6587\u6863\u5df2\u52a0\u8f7d\u540e\u4f7f\u7528\u5b83\uff08\u6bd4\u5982\u5728\u51fd\u6570\u4e2d\uff09\uff0c\u4f1a\u8986\u76d6\u6574\u4e2a\u6587\u6863\u3002\n&lt;\/p&gt;\n&lt;button type=\"button\" onclick=\"myfunction()\"&gt;\u70b9\u51fb\u8fd9\u91cc&lt;\/button&gt;<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u8b8a\u6578\"> JavaScript -\u6559\u80b2 \u5b66\u751f \u88dc\u7fd2 &gt;&gt; \u7528\u6cd5&gt;&gt;  \u8b8a\u6578<\/h2>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"260\" height=\"194\" src=\"https:\/\/itteacheritfreelance.hk\/wordpress\/wp-content\/uploads\/2020\/04\/JavaScript-\u6559\u80b2-\u5b78\u751f-\u88dc\u7fd2.jpg\" alt=\"JavaScript ,code, coding,\u7a0b\u5e8f\u8bbe\u8ba1, \u7535\u5b50\u8ba1\u7b97\u673a,\u6559\u80b2,IT,\u96fb\u8166\u73ed, \u6559\u80b2, student,\u5b66\u751f, \u8f85\u5bfc,\u5b66\u4e60,study, Computer, teacher,mobile, Android ,learn, tutor,\u5728\u7ebf\u5b66\u4e60, \u6559\u5b66, \u540c\u5b66,\u540c\u5b78, \u7535\u5b50\u8ba1\u7b97\u673a,\u6559\u80b2,IT, typescript,\u96fb\u8166\u73ed, \u88dc\u7fd2, \u8bfe\u7a0b,\u8ab2\u7a0b, \u52a9\u6559, \u5bb6\u6559, \u88dc\u7fd2\u6559\u5b78, \u9ad8\u7ea7\u8bed\u8a00, \u7a0b\u5f0f\u7f16\u5199, \u7a0b\u5f0f\u7de8\u5beb, \u5174\u8da3\u73ed, \u8208\u8da3\u73ed, \u4fe1\u606f\u6280\u672f, \u7a0b\u5e8f\u8bbe\u8ba1, \u79fb\u52a8\u7535\u8bdd, \u7535\u5b50\u8ba1\u7b97\u5668, \u4fe1\u606f, C++, Java, Python, JavaScript, MySQL, Server, CSS, HTML,\u8ba1\u7b97\u673a, \u96fb\u8166, #freelance, programming, \u79c1\u4eba\u8001\u5e08,\u79c1\u4eba\u8001\u5e2b, \u96fb\u8166\u8ab2\u7a0b, \u8cc7\u8a0a\u79d1\u6280, \u4e2d\u5b66,\u4e2d\u5b78, \u81ea\u7531\u804c\u4e1a,\u81ea\u7531\u8077\u696d, \u81ea\u7531\u5de5\u4f5c, IT freelance\" class=\"wp-image-14880\" srcset=\"https:\/\/itteacheritfreelance.hk\/wordpress\/wp-content\/uploads\/2020\/04\/JavaScript-\u6559\u80b2-\u5b78\u751f-\u88dc\u7fd2.jpg 260w, https:\/\/itteacheritfreelance.hk\/wordpress\/wp-content\/uploads\/2020\/04\/JavaScript-\u6559\u80b2-\u5b78\u751f-\u88dc\u7fd2-80x60.jpg 80w\" sizes=\"(max-width: 260px) 100vw, 260px\" \/><figcaption>JavaScript \u6559\u80b2 \u5b78\u751f \u88dc\u7fd2<\/figcaption><\/figure><\/div>\n\n\n\n<p>\u5728\u7a0b\u5f0f\u8a9e\u8a00\u4e2d\u8b8a\u6578\u662f\u4e00\u500b\u66ab\u6642\u5132\u5b58\u8cc7\u6599\u7684\u5730\u65b9\uff0c\u8ce6\u503c\u7d66\u8b8a\u6578\u7684\u503c\u90fd\u6703\u6709\u5c0d\u61c9\u7684\u8cc7\u6599\u578b\u614b\uff0c\u7136\u800c JavaScript \u662f\u5f31\u578b\u5225\uff08Weak type\uff09\u6240\u4ee5\u6703\u6709\u81ea\u52d5\u8f49\u578b\u7684\u60c5\u5f62\u3002<\/p>\n\n\n\n<p>\u5728 JavaScript \u4e2d\uff0c\u5168\u57df\u8b8a\u6578\u5c07\u4f7f\u7528&nbsp;<code>var<\/code>\uff0c\u800c\u5728 ES6 \u4e2d\u70ba\u4e86\u89e3\u6c7a\u8b8a\u6578\u6c61\u67d3\u6216\u8aa4\u7528\u60c5\u5f62\u5c07&nbsp;<code>block-scope<\/code>&nbsp;\u7684\u8b8a\u6578\u4f7f\u7528&nbsp;<code>let<\/code>\uff0c\u82e5\u4f60\u9700\u8981\u56fa\u5b9a\u4e0d\u8b8a\u7684\u5e38\u6578\u5247\u662f\u4f7f\u7528&nbsp;<code>const<\/code>\u3002 \u5176\u4e2d\u8b8a\u6578\u578b\u5225\u53c8\u5206\u70ba\uff1aPrimitive Data Type\uff1aString\u3001Number\u3001Boolean\uff08 true \u6216 false\uff09\u3001undefinded\u3001null\uff0cReference Data Types\uff1aObject \u5169\u7a2e\uff0c\u5dee\u5225\u5728\u65bc\u5c07\u7269\u4ef6\u8b8a\u6578\u8ce6\u503c\u7d66\u53e6\u5916\u4e00\u500b\u8b8a\u6578\u6642\u662f\u628a\u5f15\u7528\u8ce6\u503c\u7d66\u65b0\u8b8a\u6578\uff0c\u6240\u4ee5\u7576\u65b0\u8b8a\u6578\u66f4\u6539\u5c6c\u6027\u6642\u6703\u5f71\u97ff\u5230\u539f\u4f86\u7269\u4ef6\u3002<\/p>\n\n\n\n<p>Primitive Data Type\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"\"><tbody><tr><td>var num = 12;<br>const str = &#8216;Mark&#8217;;<br><br>function checkLike() {<br>\tlet isActived = true;<br>}<br><br><em>\/\/ console.log \u53ef\u4ee5\u8b93\u958b\u767c\u8005\u900f\u904e\u700f\u89bd\u5668\u958b\u767c\u8005\u5de5\u5177\u770b\u5230\u8a0a\u606f\uff0c\u65b9\u4fbf\u9664\u932f<\/em><br>console.log(num);<br>console.log(str);<br><em>\/\/ \u56e0\u70ba let \u662f function block scope\uff0c\u6545\u6703\u7522\u751f &#8220;ReferenceError: isActived is not defined \u932f\u8aa4<\/em><br>console.log(isActived);<br><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Reference Data Types\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"\"><tbody><tr><td><em>\/\/ \u5c07\u7269\u4ef6\u8b8a\u6578\u8ce6\u503c\u7d66\u53e6\u5916\u4e00\u500b\u8b8a\u6578\u6642\u662f\u628a\u5f15\u7528\u8ce6\u503c\u7d66\u65b0\u8b8a\u6578\uff0c\u6240\u4ee5\u7576\u65b0\u8b8a\u6578\u66f4\u6539\u5c6c\u6027\u6642\u6703\u5f71\u97ff\u5230\u539f\u4f86\u7269\u4ef6<\/em><br>let a = { name: &#8216;Zuck&#8217; };<br>console.log(a);<br>let b = a;<br>b.name = &#8216;Jack&#8217;;<br>console.log(a);<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u7535\u5b50\u8ba1\u7b97\u673a -\u6559\u80b2 -IT \u96fb\u8166\u73ed&gt;&gt;Facebook \u806f\u7d61:<\/strong><\/h2>\n\n\n\n<p><strong>\u627e\u8001\u5e2b 24 hours facebook channel :<\/strong><br><a href=\"https:\/\/www.facebook.com\/itteacheritfreelance\/?ref=aymt_homepage_panel\">https:\/\/www.facebook.com\/itteacheritfreelance\/?ref=aymt_homepage_panel<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"448\" height=\"73\" src=\"https:\/\/itteacheritfreelance.hk\/wordpress\/wp-content\/uploads\/2020\/02\/12790998_1105715336140641_1931392117099515328_n.png\" alt=\"&quot;\u7535\u5b50\u8ba1\u7b97\u673a -\u6559\u80b2 -IT \u96fb\u8166\u73ed&quot; \u70ba\u5927\u5bb6\u914d\u5c0d\u7535\u5b50\u8ba1\u7b97\u673a\u8001\u5e2b, \u96fb\u8166\u88dc\u7fd2,\u96fb\u8166\u73ed, \u96fb\u8166\u8ab2\u7a0b, it \u6559\u80b2, \u8cc7\u8a0a\u79d1\u6280 \u6559\u80b2, \u88dc\u7fd2, \u81ea\u7531\u8077\u696d, \u81ea\u7531\u5de5\u4f5c,IT freelance, \u79c1\u4eba\u8001\u5e2b, PHP\u88dc\u7fd2, HTML\u88dc\u7fd2, CSS\u88dc\u7fd2, JavaScript\u88dc\u7fd2, XML, Java\u88dc\u7fd2,Server\u88dc\u7fd2, MySQL\u88dc\u7fd2, \u4e2d\u5b78\u96fb\u8166. #Computer, #mobile, #Android, #apple, #game, #movie, #anime, #animation, #\u7535\u5b50\u8ba1\u7b97\u673a, #\u6559\u80b2, #\u4fe1\u606f\u6280\u672f, #\u7a0b\u5e8f\u8bbe\u8ba1, #\u79fb\u52a8\u7535\u8bdd, #\u7535\u5b50\u8ba1\u7b97\u5668, #\u4fe1\u606f, #IT, #\u96fb\u8166\u73ed, #C++, #Java, #Python, #JavaScript, #\u96fb\u8166, #IT, #freelance, #programming, #\u96fb\u8166\u88dc\u7fd2, #\u96fb\u8166\u73ed, #\u5bb6\u6559, #\u79c1\u4eba\u8001\u5e2b, #information technology, #teacher, #\u96fb\u8166\u73ed, #\u96fb\u8166\u8ab2\u7a0b, #it \u6559\u80b2, #\u8cc7\u8a0a\u79d1\u6280, #\u88dc\u7fd2, #\u81ea\u7531\u8077\u696d, #\u81ea\u7531\u5de5\u4f5c, #IT freelance, #\u79c1\u4eba\u8001\u5e2b, #\u4e2d\u5b78\u96fb\u8166, #PHP\u88dc\u7fd2, #HTML\u88dc\u7fd2, #CSS\u88dc\u7fd2, #JavaScript\u88dc\u7fd2, #XML, #Java\u88dc\u7fd2,#Server\u88dc\u7fd2, #MySQL\u88dc\u7fd2\" class=\"wp-image-14\" srcset=\"https:\/\/itteacheritfreelance.hk\/wordpress\/wp-content\/uploads\/2020\/02\/12790998_1105715336140641_1931392117099515328_n.png 448w, https:\/\/itteacheritfreelance.hk\/wordpress\/wp-content\/uploads\/2020\/02\/12790998_1105715336140641_1931392117099515328_n-300x49.png 300w\" sizes=\"(max-width: 448px) 100vw, 448px\" \/><\/figure>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-layout-1 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-wordpress\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"yunq78Rln1\"><a href=\"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/javascript-study-student-learn-introduction\/\">JavaScript -\u6559\u80b2 \u5b66\u751f  \u88dc\u7fd2  &gt;&gt; \u7c21\u4ecb<\/a><\/blockquote><iframe title=\"JavaScript -\u6559\u80b2 \u5b66\u751f  \u88dc\u7fd2  &gt;&gt; \u7c21\u4ecb &#8212; \" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/javascript-study-student-learn-introduction\/embed\/#?secret=yunq78Rln1\" data-secret=\"yunq78Rln1\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-wordpress\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"aB2viWCflj\"><a href=\"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/2020\/04\/27\/javascript-code-study-education-use\/\">JavaScript -\u6559\u80b2 \u5b66\u751f \u88dc\u7fd2 &gt;&gt; \u7528\u6cd5<\/a><\/blockquote><iframe title=\"JavaScript -\u6559\u80b2 \u5b66\u751f \u88dc\u7fd2 &gt;&gt; \u7528\u6cd5 &#8212; \" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/2020\/04\/27\/javascript-code-study-education-use\/embed\/#?secret=aB2viWCflj\" data-secret=\"aB2viWCflj\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>JavaScript \u7684\u6a94\u6848\u53ea\u8981\u4f7f\u7528\u4e00\u822c\u7684\u6587\u5b57\u7de8\u8f2f\u5668\u5373\u53ef\u7de8\u8f2f\uff08\u5b58\u6210 .js \u6a94\u6848\uff09\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528 Sublime Text \u7b49\u7de8\u8f2f\u5668\u9032\u884c\u958b\u767c\uff0cJSBin \u9019\u500b\u7dda\u4e0a\u5de5\u5177\u9032\u884c\u6e2c\u8a66\uff08\u7576\u7136\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528 Chrome\u3001Firefox \u7b49\u700f\u89bd\u5668\u7684\u958b\u767c\u8005\u5de5\u5177\uff09\u3002\u9664\u4e86\u7de8\u8f2f\u5668\u5916\uff0c\u5be6\u969b\u958b\u767c\u4e0a\u6211\u5011\u4e5f\u6703\u9700\u8981\u7528\u5230 Node.js \u958b\u767c\u74b0\u5883 \u548c NPM \u5957\u4ef6\u7ba1\u7406\u7cfb\u7d71\uff08\u6309\u7167 Node.js \u5b98\u65b9\u6307\u793a\u5373\u53ef\u5b89\u88dd\uff09\u3002Node.js \u662f\u4e00\u500b\u958b\u653e\u539f\u59cb\u78bc\u3001\u8de8\u5e73\u53f0\u7684\u3001\u53ef\u7528\u65bc\u4f3a\u670d\u5668\u7aef\u548c\u7db2\u8def\u61c9\u7528\u7684\u57f7\u884c\u74b0\u5883\u3002<\/p>\n<\/div>","protected":false},"author":1,"featured_media":14819,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"JavaScript -\u6559\u80b2 \u5b66\u751f \u88dc\u7fd2 >> \u7528\u6cd5 - ITTeacherITFreelance.hk","description":"JavaScript \u7684\u6a94\u6848\u53ea\u8981\u4f7f\u7528\u4e00\u822c\u7684\u6587\u5b57\u7de8\u8f2f\u5668\u5373\u53ef\u7de8\u8f2f\uff08\u5b58\u6210 .js \u6a94\u6848\uff09\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528 Sublime Text \u7b49\u7de8\u8f2f\u5668\u9032\u884c\u958b\u767c\uff0cJSBin \u9019\u500b\u7dda\u4e0a\u5de5\u5177\u9032\u884c\u6e2c\u8a66\uff08\u7576\u7136\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528 Chrome\u3001Firefox \u7b49\u700f\u89bd\u5668\u7684\u958b\u767c\u8005\u5de5\u5177\uff09\u3002\u9664\u4e86\u7de8\u8f2f\u5668\u5916\uff0c\u5be6\u969b\u958b\u767c\u4e0a\u6211\u5011\u4e5f\u6703\u9700\u8981\u7528\u5230 Node.js \u958b\u767c\u74b0\u5883 \u548c N"},"footnotes":""},"categories":[2805],"tags":[280,2847,2828,2829,2854,2810,2818,2816,2827,1513,2809,2833,266,2813,1518,2819,2815,2856,1123,2831,2838,2841,2808,2812,2852,2848,2850,2837,2839,2846,2832,2853,2857,2836,2834,1094,2851,2830,2814,2806,2845,2826,2844,2825,2822,2821,2823,2849,2843,2840,2835,2820,2842,2807,2858,2817,2855,2811,2824],"_links":{"self":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/14877"}],"collection":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=14877"}],"version-history":[{"count":5,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/14877\/revisions"}],"predecessor-version":[{"id":14997,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/14877\/revisions\/14997"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/media\/14819"}],"wp:attachment":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=14877"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=14877"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=14877"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}