<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jason Yang on Medium]]></title>
        <description><![CDATA[Stories by Jason Yang on Medium]]></description>
        <link>https://medium.com/@yangchihhsiang?source=rss-ade97304de4a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*PQFFF_20DVSlA5rO.</url>
            <title>Stories by Jason Yang on Medium</title>
            <link>https://medium.com/@yangchihhsiang?source=rss-ade97304de4a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 08:20:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yangchihhsiang/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[FreeCodeCamp 9— Multiply Two Numbers with JavaScript]]></title>
            <link>https://medium.com/@yangchihhsiang/freecodecamp-9-multiply-two-numbers-with-javascript-4a1721032bf?source=rss-ade97304de4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a1721032bf</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[transportation]]></category>
            <category><![CDATA[freecodecamp]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Jason Yang]]></dc:creator>
            <pubDate>Fri, 04 May 2018 09:26:51 GMT</pubDate>
            <atom:updated>2018-05-04T09:26:51.985Z</atom:updated>
            <content:encoded><![CDATA[<p>使用JavaScript將兩數相乘。</p><blockquote><em>Hi~,我是Jason Yang，本系列是針對JavaScript相關主題進行翻譯的技術譯文，每篇文章的出處連結都會放在文末，Here we go~</em></blockquote><p>We can also multiply one number by another.<br>我們能將兩數相乘。</p><p>JavaScript uses the *symbol for multiplication of two numbers.<br>JavaScript使用符號*運算乘法。</p><p><strong>Example</strong></p><pre>myVar = 13 * 13; // assigned 169</pre><blockquote><strong><em>練習挑戰<br></em></strong><em>譯者按：練習部分請到最下方的原文出處，可以輸入程式碼，寫好程式碼，按</em><em>ctl+enter會執行程式碼，正確的話會得到✅，錯誤會顯示❌。</em></blockquote><p>Change the 0so that product will equal 80..<br>改變數字0 讓差為80。</p><ul><li>Make the variable product equal 80.<br>使變數之積等於12。</li><li>Use the * operator.<br>使用*運算子。</li></ul><blockquote><strong>原文出處</strong><a href="https://beta.freecodecamp.org/en/challenges/basic-javascript/subtract-one-number-from-another-with-javascript"><br></a><a href="https://beta.freecodecamp.org/en/challenges/basic-javascript/multiply-two-numbers-with-javascript">https://beta.freecodecamp.org/en/challenges/basic-javascript/multiply-two-numbers-with-javascript</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a1721032bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FreeCodeCamp 8 — Subtract One Number from Another with JavaScript]]></title>
            <link>https://medium.com/@yangchihhsiang/freecodecamp-8-subtract-one-number-from-another-with-javascript-95fefd453deb?source=rss-ade97304de4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/95fefd453deb</guid>
            <category><![CDATA[freecodecamp]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[translation]]></category>
            <dc:creator><![CDATA[Jason Yang]]></dc:creator>
            <pubDate>Tue, 01 May 2018 08:59:35 GMT</pubDate>
            <atom:updated>2018-05-01T09:00:47.156Z</atom:updated>
            <content:encoded><![CDATA[<p>使用JavaScript將兩數相減</p><blockquote><em>Hi~,我是Jason Yang，本系列是針對JavaScript相關主題進行翻譯的技術譯文，每篇文章的出處連結都會放在文末，Here we go~</em></blockquote><p>We can also subtract one number from another.<br>我們能將兩數相減。</p><p>JavaScript uses the - symbol for subtraction.<br>JavaScript使用符號-運算減法。</p><p><strong>Example</strong></p><pre>myVar = 12 - 6; // assigned 6</pre><blockquote><strong><em>練習挑戰<br></em></strong><em>譯者按：練習部分請到最下方的原文出處，可以輸入程式碼，寫好程式碼，按</em>ctl+enter<em>會執行程式碼，正確的話會得到✅，錯誤會顯示❌。</em></blockquote><p>Change the 0 so the difference is 12.<br>改變數字0 讓差為12。</p><ul><li>Make the variable difference equal 12.<br>使變數之差等於12。</li><li>Only subtract one number from 45.<br>數值45不要更動。</li></ul><blockquote><strong>原文出處</strong><a href="https://beta.freecodecamp.org/en/challenges/basic-javascript/subtract-one-number-from-another-with-javascript"><br>https://beta.freecodecamp.org/en/challenges/basic-javascript/subtract-one-number-from-another-with-javascript</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95fefd453deb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FreeCodeCamp 0— Introduction to JavaScript]]></title>
            <link>https://medium.com/@yangchihhsiang/freecodecamp-0-introduction-to-javascript-a5ad2f459e45?source=rss-ade97304de4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5ad2f459e45</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[freecodecamp]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[translation]]></category>
            <dc:creator><![CDATA[Jason Yang]]></dc:creator>
            <pubDate>Tue, 01 May 2018 08:44:04 GMT</pubDate>
            <atom:updated>2018-05-01T09:01:05.101Z</atom:updated>
            <content:encoded><![CDATA[<p>JavaScript簡介</p><blockquote>Hi~,我是Jason Yang，本系列是針對JavaScript相關主題進行翻譯的技術譯文，每篇文章的出處連結都會放在文末，Here we go~</blockquote><p>JavaScript is a high-level programming language that all modern web browsers support. <br>JavaScript是一個所有現代網頁瀏覽器都支援的高階程式語言。</p><p>It is also one of the core technologies of the web, along with HTML and CSS that you may have learned previously. <br>接續你先前所學的HTML和CSS，就是學JavaScript。它和前兩者並列網頁的三大核心技術。</p><p>This section will cover basic programming concepts in JavaScript, which range from variables and arithmetic to objects and loops.<br>這章節將涵蓋基礎的JavaScript觀念，範圍從變數和運算到物件和迴圈。</p><blockquote>原文出處<br><a href="https://beta.freecodecamp.org/en/challenges/basic-javascript/introduction-to-javascript">https://beta.freecodecamp.org/en/challenges/basic-javascript/introduction-to-javascript</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5ad2f459e45" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FreeCodeCamp 7— Add Two Numbers with JavaScript]]></title>
            <link>https://medium.com/@yangchihhsiang/freecodecamp-7-add-two-numbers-with-javascript-d422049caa1a?source=rss-ade97304de4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d422049caa1a</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[freecodecamp]]></category>
            <category><![CDATA[transportation]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Jason Yang]]></dc:creator>
            <pubDate>Fri, 27 Apr 2018 09:21:23 GMT</pubDate>
            <atom:updated>2018-05-01T09:05:13.841Z</atom:updated>
            <content:encoded><![CDATA[<p>使用JavaScript將兩個數字相加</p><blockquote><em>Hi~,我是Jason Yang，本系列是針對JavaScript相關主題進行翻譯的技術譯文，每篇文章的出處連結都會放在文末，Here we go~</em></blockquote><p>Numberis a data type in JavaScript which represents numeric data.<br>數值是JavaScript中代表數值資料的資料型別。</p><p>Now let’s try to add two numbers using JavaScript.<br>現在，讓我們用JavaScript將兩個數字加起來。</p><p>JavaScript uses the +symbol as addition operation when placed between two numbers.<br>JavaScript用符號+ 將其兩邊的數字進行加法運算。</p><p>Example<br>舉例</p><pre>myVar = 5 + 10; //assigned 15</pre><blockquote><strong><em>練習挑戰<br></em></strong><em>譯者按：練習部分請到最下方的原文出處，可以輸入程式碼，寫好程式碼，按</em>ctl+enter<em>會執行程式碼，正確的話會得到✅，錯誤會顯示❌。</em></blockquote><p>Change the 0so that sum will equal 20.<br>改變0讓總和等於20。</p><ul><li>sum should equal 20<br>總和應等於20。</li><li>Use the + operator<br>使用+運算子。</li></ul><p><strong><em>原文出處<br></em></strong><a href="https://www.freecodecamp.org/challenges/add-two-numbers-with-javascript">https://www.freecodecamp.org/challenges/add-two-numbers-with-javascript</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d422049caa1a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FreeCodeCamp 6 — Understanding Case Sensitivity in Variables]]></title>
            <link>https://medium.com/@yangchihhsiang/freecodecamp-6-understanding-case-sensitivity-in-variables-431049503adf?source=rss-ade97304de4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/431049503adf</guid>
            <category><![CDATA[freecodecamp]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[transportation]]></category>
            <dc:creator><![CDATA[Jason Yang]]></dc:creator>
            <pubDate>Mon, 23 Apr 2018 07:36:00 GMT</pubDate>
            <atom:updated>2018-05-01T09:04:56.172Z</atom:updated>
            <content:encoded><![CDATA[<p>了解變數的英文大小寫不同</p><blockquote>Hi~,我是Jason Yang，本系列是針對JavaScript相關主題進行翻譯的技術譯文，每篇文章的出處連結都會放在文末，Here we go~</blockquote><p>In JavaScript all variables and function names are case sensitive. <br>在JavaScript中大寫和小寫的英文字母是不同的。</p><p>This means that capitalization matters.<br>這意味著大寫字母會影響結果。</p><p>MYVARis not the same as MyVarnor myvar.<br>MYVAR和MyVar或myvar都不一樣，</p><p>It is possible to have multiple distinct variables with the same name but different casing.<br>這表示我們可能造出許多字面上相同的變數，但是它們大小寫卻不同。</p><p>It is strongly recommended that for the sake of clarity, you <em>do not</em>use this language feature.<br>為了有「乾淨」的程式碼，強烈建議不要使用此特性。</p><h4>Best Practice</h4><p>Write variable names in Javascript in camelCase. In camelCase, multi-word variable names have the first word in lowercase and the first letter of each subsequent word is capitalized.</p><p>最佳實踐</p><p>用駝峰式命名法為JavaScript 的變數命名，駝峰式命名中，多單字組成的變數名稱，第一個單字結尾小寫，之後單字的第一個字母為大寫。</p><p><strong>Examples:</strong></p><pre>var someVariable;<br>var anotherVariableName;<br>var thisVariableNameIsTooLong;</pre><blockquote><strong>練習挑戰<br></strong>譯者按：練習部分請到最下方的原文出處，可以輸入程式碼，寫好程式碼，按<em>ctl+enter</em>會執行程式碼，正確的話會得到✅，錯誤會顯示❌。</blockquote><p>Modify the existing declarations and assignments so their names use camelCase.<br>Do not create any new variables.<strong><br></strong>修改已存在的宣告與指派值，使它們使用駝峰式命名<br>不要創造新的變數</p><ul><li>studlyCapVar is defined and has a value of 10<br>studlyCapVar被定義，其值為10</li><li>properCamelCase is defined and has a value of &quot;A String&quot;<br>properCamelCase被定義，其值為&quot;A String&quot;</li><li>titleCaseOver is defined and has a value of 9000<br>titleCaseOver被定義，其值為9000</li><li>studlyCapVar should use camelCase in both declaration and assignment sections.<br>studlyCapVar 應該要使用駝峰式命名宣告與指派值。</li><li>properCamelCase should use camelCase in both declaration and assignment sections.<br>properCamelCase應該要使用駝峰式命名宣告與指派值。</li><li>titleCaseOver should use camelCase in both declaration and assignment sections.</li></ul><blockquote><strong>原文出處<br></strong><a href="https://www.freecodecamp.org/challenges/understanding-case-sensitivity-in-variables">https://www.freecodecamp.org/challenges/understanding-case-sensitivity-in-variables</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=431049503adf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FreeCodeCamp 5 — Understanding Uninitialized Variables]]></title>
            <link>https://medium.com/@yangchihhsiang/freecodecamp-5-understanding-uninitialized-variables-ca2d27a4ee4?source=rss-ade97304de4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca2d27a4ee4</guid>
            <category><![CDATA[transportation]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[freecodecamp]]></category>
            <dc:creator><![CDATA[Jason Yang]]></dc:creator>
            <pubDate>Sun, 22 Apr 2018 11:31:49 GMT</pubDate>
            <atom:updated>2018-05-01T09:04:31.600Z</atom:updated>
            <content:encoded><![CDATA[<p>了解未給初始值的變數</p><blockquote><em>Hi~,我是Jason Yang，本系列是針對JavaScript相關主題進行翻譯的技術譯文，每篇文章的出處連結都會放在文末，Here we go~</em></blockquote><p>When JavaScript variables are declared, they have an initial value of undefined. <br>當JavaScript的變數被宣告時，有一個初始值為undefined (未定義)。</p><p>If you do a mathematical operation on an undefinedvariable your result will be NaNwhich means &quot;Not a Number&quot;.<br>如果你對這個undefined的變數進行數學運算，你會得到一個NaN，意思是「不是一個數值(Not a Number)」</p><p>If you concatenate a string with an undefinedvariable, you will get a literal string of &quot;undefined&quot;.<br>如果你對這個undefined的變數進行字串連接，你會得到一個字串&quot;undefined&quot;。</p><blockquote><strong>練習挑戰<br></strong>譯者按：練習部分請到最下方的原文出處，可以輸入程式碼，寫好程式碼，按<em>ctl+enter</em>會執行程式碼，正確的話會得到✅，錯誤會顯示❌。</blockquote><p>Initialize the three variables a, b, and cwith 5, 10, and &quot;I am a&quot;respectively so that they will not be undefined.<br>分別給a、b和c三個初始值5、10和&quot;I am a&quot; ，使它們不是undefined</p><ul><li>a should be defined and have a value of 6<br>a需要被定義一個值6</li><li>b should be defined and have a value of 15<br>b需要被定義一個值15</li><li>c should not contain undefined and should have a value of &quot;I am a String!&quot;<br>c不應該為undefined 並給字串&quot;I am a String!&quot;</li><li>Do not change code below the line<br>各個程式碼不要換行。</li></ul><blockquote><strong>原文出處<br></strong><a href="https://www.freecodecamp.org/challenges/understanding-uninitialized-variables">https://www.freecodecamp.org/challenges/understanding-uninitialized-variables</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca2d27a4ee4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FreeCodeCamp 4 — Initializing Variables with the Assignment Operator]]></title>
            <link>https://medium.com/@yangchihhsiang/freecodecamp-4-initializing-variables-with-the-assignment-operator-e8c2cf637377?source=rss-ade97304de4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8c2cf637377</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[freecodecamp]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[translation]]></category>
            <dc:creator><![CDATA[Jason Yang]]></dc:creator>
            <pubDate>Fri, 20 Apr 2018 11:54:16 GMT</pubDate>
            <atom:updated>2018-05-01T09:04:06.791Z</atom:updated>
            <content:encoded><![CDATA[<p>用指定運算子初始化變數</p><blockquote><em>Hi~,我是Jason Yang，本系列是針對JavaScript相關主題進行翻譯的技術譯文，每篇文章的出處連結都會放在文末，Here we go~</em></blockquote><p>It is common to initialize a variable to an initial value in the same line as it is declared.<br>我們常常在在宣告一個變數的同時，在程式碼同一行給該變數一個初始值。</p><p>var myVar = 0;</p><p>Creates a new variable called myVarand assigns it an initial value of 0.<br>創造一個名為myVar 的變數，並指派初始值0給它。</p><blockquote><strong>練習挑戰<br></strong>譯者按：練習部分請到最下方的原文出處，可以輸入程式碼，寫好程式碼，按ctl+enter會執行程式碼，正確的話會得到✅，錯誤會顯示❌。</blockquote><p>Define a variable awith varand initialize it to a value of 9.<strong><br></strong>用var定義一個變數a，並給予初始值9。</p><ul><li>Initialize a to a value of 9.<br>給予a初始值9。</li></ul><blockquote><strong>原文出處<br></strong><a href="https://www.freecodecamp.org/challenges/initializing-variables-with-the-assignment-operator">https://www.freecodecamp.org/challenges/initializing-variables-with-the-assignment-operator</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8c2cf637377" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FreeCodeCamp 3 — Storing Values with the Assignment Operator]]></title>
            <link>https://medium.com/@yangchihhsiang/freecodecamp-3-storing-values-with-the-assignment-operator-50ec44e0a28?source=rss-ade97304de4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/50ec44e0a28</guid>
            <category><![CDATA[translation]]></category>
            <category><![CDATA[freecodecamp]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Jason Yang]]></dc:creator>
            <pubDate>Fri, 20 Apr 2018 07:26:19 GMT</pubDate>
            <atom:updated>2018-05-01T09:03:39.181Z</atom:updated>
            <content:encoded><![CDATA[<p>藉由指定運算子(Assignment Operator)來儲存值</p><blockquote><em>Hi~,我是Jason Yang，本系列是針對JavaScript相關主題進行翻譯的技術譯文，每篇文章的出處連結都會放在文末，Here we go~</em></blockquote><p>In JavaScript, you can store a value in a variable with the assignment operator.<br>在JavaScript 中，你能藉由指定運算子儲存一個值於變數。</p><p>myVariable = 5;</p><p>Assigns the Number value 5 to myVariable.<br>指派數值5 到myVariable。</p><p>Assignment always goes from right to left. <br>指派的方向都是右到左。</p><p>Everything to the right of the =operator is resolved before the value is assigned to the variable to the left of the operator.<br>在運算子=右邊的任何東西會處理好後才被指派到運算子左邊的變數。</p><blockquote>譯者按:這邊的處理，意思是計算數值、字串組合等等。</blockquote><pre>myVar = 5;<br>myNum = myVar;</pre><p>Assigns 5to myVarand then resolves myVarto 5again and assigns it to myNum.<br>指派5給myvar，然候先將myVar變成5，再指派給myNum。</p><blockquote><strong>練習挑戰<br></strong>譯者按：練習部分請到最下方的原文出處，可以輸入程式碼，寫好程式碼，按ctl+enter會執行程式碼，正確的話會得到✅，錯誤會顯示❌。</blockquote><p>Assign the value 7 to variable a.<br>指派數值7給變數a。</p><p>Assign the contents of a to variable b.<br>指派a的內容給變數b。</p><ul><li>Do not change code above the line<br>不要改變程式碼所在的行數</li><li>a should have a value of 7<br>a的值應該為7</li><li>b should have a value of 7<br>b的值應該為7</li><li>a should be assigned to b with =<br>a應該用=指派給b</li></ul><blockquote><strong>原文出處<br></strong><a href="https://www.freecodecamp.org/challenges/storing-values-with-the-assignment-operator">https://www.freecodecamp.org/challenges/storing-values-with-the-assignment-operator</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50ec44e0a28" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FreeCodeCamp 2 — Declare JavaScript Variables]]></title>
            <link>https://medium.com/@yangchihhsiang/freecodecamp-2-declare-javascript-variables-cabf60c5e8a0?source=rss-ade97304de4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/cabf60c5e8a0</guid>
            <category><![CDATA[translation]]></category>
            <category><![CDATA[freecodecamp]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Jason Yang]]></dc:creator>
            <pubDate>Thu, 19 Apr 2018 09:32:55 GMT</pubDate>
            <atom:updated>2018-05-01T09:02:30.595Z</atom:updated>
            <content:encoded><![CDATA[<p>宣告JavaScript變數(Variables)</p><blockquote>Hi~,我是Jason Yang，本系列是針對JavaScript相關主題進行翻譯的技術譯文，每篇文章的出處連結都會放在文末，Here we go~</blockquote><p>In computer science, data is anything that is meaningful to the computer.<br>電腦科學中，資料(data)才是對電腦有意義的。</p><p>JavaScript provides seven different data types which are undefined, null, boolean, string, symbol, number, and object.<br>JavaScript提供了七種不同的資料型別，分別是undefined(未定義)、 null(空值)、 boolean(布林值)、 string(字串)、 symbol(符號)、 number(數值) 和object(物件).</p><p>For example, computers distinguish between numbers, such as the number 12, and strings, such as &quot;12&quot;, &quot;dog&quot;, or &quot;123 cats&quot;, which are collections of characters.<br>舉例來說，電腦用&quot; &quot; 來區分數值(number)與字串(string)，例如數值12與字串&quot;12&quot;是不同的。&quot;dog&quot;和123 cats也是字串。</p><p>Computers can perform mathematical operations on a number, but not on a string.<br>電腦可以對數值執行數學運算，字串則不行。</p><p>Variables allow computers to store and manipulate data in a dynamic fashion.<br>變數允許電腦動態儲存和操作資料，</p><p>They do this by using a “label” to point to the data rather than using the data itself.<br>他們藉由使用一個「標籤」來標示該資料而不是直接使用資料本身。</p><p>Any of the seven data types may be stored in a variable.<br>這七種型別的任一資料型別都會被儲存成一個變數。</p><p>Variables are similar to the x and y variables you use in mathematics, which means they&#39;re a simple name to represent the data we want to refer to.<br><strong>變數</strong>就像是數學上用來表示的x和y變數，這些數學上的變數代表我們想要求的數值，</p><p>Variables differ from mathematical variables in that they can store different values at different times.<br>電腦的變數和數學的變數差異在於電腦的變數的值可以一直被修改然後儲存。</p><p>We tell JavaScript to create or declare a variable by putting the keyword var in front of it, like so:<br>在JavaScript中，在變數之前使用字詞var來創造或宣告一個變數，如下：</p><pre>var ourName;</pre><p>Creates a variable called ourName.<br>宣告一個名為ourName的變數。</p><p>In JavaScript we end statements with semicolons.<br>在Javascript中，用分號結束句子。</p><p>Variablenames can be made up of numbers, letters, and $or _, but may not contain spaces or start with a number.<br>變數名稱可以由數字、字詞、$或_組成，但不包含空白鍵(spaces)，也不能使用數字開頭。</p><blockquote><strong>練習挑戰<br></strong>譯者按：練習部分請到最下方的原文出處，可以輸入程式碼，寫好程式碼，按ctl+enter會執行程式碼，正確的話會得到✅，錯誤會顯示❌。</blockquote><p>Use the var keyword to create a variable called myName.<strong><br></strong>使用var宣告一個名為myName的變數。</p><p><strong>Hint<br></strong>Look at the ourNameexample if you get stuck.<br><strong>提示<br></strong>如果你卡住了，參考範例ourName。</p><ul><li>You should declare myName with the var keyword, ending with a semicolon.<br> 你應該要用var宣告myName並用分號結尾。</li></ul><blockquote><strong>原文出處<br></strong><a href="https://www.freecodecamp.org/challenges/declare-javascript-variables">https://www.freecodecamp.org/challenges/declare-javascript-variables</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cabf60c5e8a0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FreeCodeCamp 1 — Comment your JavaScript Code]]></title>
            <link>https://medium.com/@yangchihhsiang/freecodecamp-1-comment-your-javascript-code-8c50752172d8?source=rss-ade97304de4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c50752172d8</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[translation]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[freecodecamp]]></category>
            <dc:creator><![CDATA[Jason Yang]]></dc:creator>
            <pubDate>Wed, 18 Apr 2018 17:18:55 GMT</pubDate>
            <atom:updated>2018-05-01T09:01:52.146Z</atom:updated>
            <content:encoded><![CDATA[<p>將你的JavaScript程式碼註解(comment)</p><blockquote>Hi~,我是Jason Yang，本系列是針對JavaScript相關主題進行翻譯的技術譯文，每篇文章的出處連結都會放在文末，，Here we go~</blockquote><p>Comments are lines of code that JavaScript will intentionally ignore.<br>註解是Javascript會忽略的程式碼，</p><p>Comments are a great way to leave notes to yourself and to other people who will later need to figure out what that code does.<br>註解能讓未來的自己或其他人能了解該程式碼的作用。</p><p>There are two ways to write comments in JavaScript:<br>以下有兩種JavaScript的註解方法：</p><p>Using //will tell JavaScript to ignore the remainder of the text on the current line:<br>使用//會告訴Javascript將該行剩餘的字忽略：</p><pre>//This is an in-line comment</pre><p>You can make a multi-line comment beginning with /*and ending with */:<br>你也可以使用/*開頭，*/結尾來多行註解：</p><pre>/*This is a <br>multi-line comment*/</pre><p><strong>Best Practice<br>最佳實踐</strong></p><p>As you write code, you should regularly add comments to clarify the function of parts of your code.<br>當你在寫程式碼時，你應該要常常加上註解來闡述該部分程式碼的功能。</p><p>Good commenting can help communicate the intent of your code — both for others <em>and </em>for your future self.<br>好的註解可以同時幫助其他人和未來的你，了解該段程式碼。</p><blockquote><strong>練習挑戰<br></strong>譯者按：練習部分請到最下方的原文出處，可以輸入程式碼，寫好程式碼，按ctl+enter會執行程式碼，正確的話會得到✅，錯誤會顯示❌。</blockquote><p>Try creating one of each type of comment.<strong><br></strong>嘗試寫出每種註解。</p><ul><li>Create a // style comment that contains at least five letters.<br>使用//寫至少五個字的註解。</li><li>Create a /* */ style comment that contains at least five letters.<br>使用/* */寫至少五個字的註解。</li><li>Make sure that you close the comment with a */.<br>確保註解有用*/結尾。</li></ul><blockquote><strong>原文出處<br></strong><a href="https://www.freecodecamp.org/challenges/comment-your-javascript-code">https://www.freecodecamp.org/challenges/comment-your-javascript-code</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c50752172d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>