<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JavaScript / TypeScript &#8211; CAPDIO</title>
	<atom:link href="https://www.capdio.com/category/programming-language/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.capdio.com</link>
	<description>遊戲開發 Studio</description>
	<lastBuildDate>Sun, 12 Apr 2026 07:25:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.capdio.com/wp-content/uploads/2024/06/cropped-capdio-favicon-white-32x32.png</url>
	<title>JavaScript / TypeScript &#8211; CAPDIO</title>
	<link>https://www.capdio.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Cocos creator 推薦你的第一款手遊 Demo</title>
		<link>https://www.capdio.com/programming-language/javascript/cocos-creator-%e6%8e%a8%e8%96%a6%e4%bd%a0%e7%9a%84%e7%ac%ac%e4%b8%80%e6%ac%be%e6%89%8b%e9%81%8a-demo/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=cocos-creator-%25e6%258e%25a8%25e8%2596%25a6%25e4%25bd%25a0%25e7%259a%2584%25e7%25ac%25ac%25e4%25b8%2580%25e6%25ac%25be%25e6%2589%258b%25e9%2581%258a-demo</link>
		
		<dc:creator><![CDATA[George]]></dc:creator>
		<pubDate>Sun, 12 Apr 2026 07:24:10 +0000</pubDate>
				<category><![CDATA[Cocos Creator]]></category>
		<category><![CDATA[JavaScript / TypeScript]]></category>
		<guid isPermaLink="false">https://www.capdio.com/?p=1915</guid>

					<description><![CDATA[除了可以照著影片中的步驟完成這一個小遊戲之外, 作者也有提供 pdf (Build_Your_First_Game_With_Cocos_Creator.pdf) 檔案說明喔! 有興趣的人可以到 cocos dashboard 裡面的 store 收尋 CocosGallery 這個分類(作者/關鍵字) 就可以找到這一個 project 並進行下載(應該是最後一頁). 有關專案內會用的資源檔案, 作者有標注可以到以下網址取得https://github.com/samuelcust/flappy-bird-assets 由於遊戲內有用到特殊字體, 因此也需要特別下載使用, 作者提供的 url 如下https://www.fontspace.com/flappy-bird-font-f21349 PS: 如果對於英文內容非常苦手的話, 站長未來另外也會提供中文與日文的解說影片.]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="Build Your First Game With Cocos Creator in 3 Hours!" width="1170" height="658" src="https://www.youtube.com/embed/zQBOxCUclx8?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p>除了可以照著影片中的步驟完成這一個小遊戲之外, 作者也有提供 pdf (Build_Your_First_Game_With_Cocos_Creator.pdf) 檔案說明喔! 有興趣的人可以到 cocos dashboard 裡面的 store 收尋 CocosGallery 這個分類(作者/關鍵字) 就可以找到這一個 project 並進行下載(應該是最後一頁).</p>



<p>有關專案內會用的資源檔案, 作者有標注可以到以下網址取得<br><a href="https://github.com/samuelcust/flappy-bird-assets">https://github.com/samuelcust/flappy-bird-assets</a></p>



<p>由於遊戲內有用到特殊字體, 因此也需要特別下載使用, 作者提供的 url 如下<br><a href="https://www.fontspace.com/flappy-bird-font-f21349">https://www.fontspace.com/flappy-bird-font-f21349</a></p>



<p>PS: 如果對於英文內容非常苦手的話, 站長未來另外也會提供中文與日文的解說影片.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>TypeScript 在變數後面加上 &#8220;!&#8221; 是什麼意思</title>
		<link>https://www.capdio.com/uncategorized/typescript-%e5%9c%a8%e8%ae%8a%e6%95%b8%e5%be%8c%e9%9d%a2%e5%8a%a0%e4%b8%8a-%e6%98%af%e4%bb%80%e9%ba%bc%e6%84%8f%e6%80%9d/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=typescript-%25e5%259c%25a8%25e8%25ae%258a%25e6%2595%25b8%25e5%25be%258c%25e9%259d%25a2%25e5%258a%25a0%25e4%25b8%258a-%25e6%2598%25af%25e4%25bb%2580%25e9%25ba%25bc%25e6%2584%258f%25e6%2580%259d</link>
					<comments>https://www.capdio.com/uncategorized/typescript-%e5%9c%a8%e8%ae%8a%e6%95%b8%e5%be%8c%e9%9d%a2%e5%8a%a0%e4%b8%8a-%e6%98%af%e4%bb%80%e9%ba%bc%e6%84%8f%e6%80%9d/#respond</comments>
		
		<dc:creator><![CDATA[George]]></dc:creator>
		<pubDate>Sun, 23 Jun 2024 07:47:30 +0000</pubDate>
				<category><![CDATA[JavaScript / TypeScript]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://www.capdio.com/?p=1654</guid>

					<description><![CDATA[在 typescript 的程式語言當中, 使用 ! 驚嘆號的意思就是代表驚嘆號前方的變數(物件)必須是存在的, 如果不存在就會出錯!有點類似主動防呆的一種用法!!! 避免在這類高階程式語言當中因為將該變數(物件)進行指派或是初始化而造成看不到(不會跳錯誤)的 bug! 以下用個範例解釋! 輸出結果如下 參考資料來源: https://blog.csdn.net/qubes/article/details/136867140]]></description>
										<content:encoded><![CDATA[
<p>在 typescript 的程式語言當中, 使用 ! 驚嘆號的意思就是代表驚嘆號前方的變數(物件)必須是存在的, 如果不存在就會出錯!<br>有點類似主動防呆的一種用法!!! 避免在這類高階程式語言當中因為將該變數(物件)進行指派或是初始化而造成看不到(不會跳錯誤)的 bug!  以下用個範例解釋!</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-ts" data-lang="TypeScript"><code>function TS_test(inputObj: any): void{
    console.log(&quot;=====================================&quot;);
    // 完全正常的 case
    console.log(&#39;Best fruit name is: &#39; + inputObj.fruit!.name);
    // 因為沒有加上 ! ,所以並未強制判斷變數(物件)並要求跳出 error
    console.log(&#39;Case 1: Best food is: &#39; + inputObj.food);
    // 因為有加上 ! ,因此程式碼會判斷 food 是否存在, 不存在的話就會跳出 error
    console.log(&#39;Case 2: Best food is: &#39; + inputObj.food!.name);
    console.log(&quot;=====================================&quot;);
}

const TaiwanBest = {
    fruit: {name: &#39;banana&#39;}
}
TS_test(TaiwanBest);</code></pre></div>



<p>輸出結果如下</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-plain"><code>console.log(&#39;Case 2: Best food is: &#39; + inputObj.food!.name);

TypeError: Cannot read properties of undefined (reading &#39;name&#39;)</code></pre></div>



<p>參考資料來源: https://blog.csdn.net/qubes/article/details/136867140</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.capdio.com/uncategorized/typescript-%e5%9c%a8%e8%ae%8a%e6%95%b8%e5%be%8c%e9%9d%a2%e5%8a%a0%e4%b8%8a-%e6%98%af%e4%bb%80%e9%ba%bc%e6%84%8f%e6%80%9d/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
