---
title: "Ya Chu (@yachuh) | Hashnode"
description: "Embarking on the Frontend Development Journey. Read the latest articles by Ya Chu on Hashnode."
url: "https://hashnode.com/@yachuh"
---

@yachuh

# Ya Chu

@yachuh · Joined August 2023

Embarking on the Frontend Development Journey

### [TypeScript - 型別斷言(Type Assertion)](https://yachuh.hashnode.dev/typescript-type-assertion?utm_source=hashnode&utm_medium=feed)

型別斷言是 TypScript 的一種機制，允許我們手動指定一個明確的型別，提供 TypeScript 編譯器無法自行推斷的額外型別資訊。 我們可以透過這兩種寫法來指定型別斷言： 語法 尖括號 <>（angle-bracket）語法 語法：<type>value - 在需要斷言的變數前加上 <Type> 即可 const myCanvas = <HTMLCanvasElement>document.getElementById("main\_canvas") as 語法 語法：value as...

2 min read · [yachuh.hashnode.dev](https://yachuh.hashnode.dev/typescript-type-assertion?utm_source=hashnode&utm_medium=feed)

[Oct 15, 2023](https://hashnode.com/posts/typescript-type-assertion/652c399ec75b59c2c06e4929)

### [JavaScript - 函式中的參數(parameters)與引數(arguments)](https://yachuh.hashnode.dev/javascript-parametersarguments?utm_source=hashnode&utm_medium=feed)

參數 (parameters) vs. 引數 (arguments) 先來看看 MDN 的說明： 參數 parameter：A parameter is a named variable passed into a function. Parameter variables are used to import arguments into functions. 引數 argument：An argument is a value (primitive or object) passed as...

4 min read · [yachuh.hashnode.dev](https://yachuh.hashnode.dev/javascript-parametersarguments?utm_source=hashnode&utm_medium=feed)

[Oct 3, 2023](https://hashnode.com/posts/javascript-parametersarguments/651bca3a741ed559305f5f33)

### [JavaScript - Scope 作用域 & Closure 閉包](https://yachuh.hashnode.dev/javascript-scope-closure?utm_source=hashnode&utm_medium=feed)

Scope 作用域 留言 什麼是作用域 「作用域就是一個變數的生存範圍，一旦出了這個範圍，就無法存取到這個變數」。 當我們把變數 a 宣告在 function 中，function 之外的地方都無法取用這個變數： // 把變數宣告在 function 中 function test1() { var a = "hello" } console.log(a) // Uncaught ReferenceError: a is not defined 但當我們把變數 b 宣告在全域，fu...

6 min read · [yachuh.hashnode.dev](https://yachuh.hashnode.dev/javascript-scope-closure?utm_source=hashnode&utm_medium=feed)

[Oct 3, 2023](https://hashnode.com/posts/javascript-scope-closure/651bc902f424226bd1d1a1b7)

### [JavaScript - this 是誰、指向哪裡，以及 call、apply、bind](https://yachuh.hashnode.dev/javascript-this-callapplybind?utm_source=hashnode&utm_medium=feed)

this 是什麼 this 是 JavaScript 的一個關鍵字 this 是 function 執行時，自動生成的一個內部物件 隨著 function 執行場合的不同，this 所指向的值，也會有所不同 this 與 function 在何處被宣告完全無關，而是取決於 function 被呼叫的方式 在大多數的情況下， this 代表的就是呼叫 function 的物件 (owner Object of the function) 當 function 是某個 object 的 ...

3 min read · [yachuh.hashnode.dev](https://yachuh.hashnode.dev/javascript-this-callapplybind?utm_source=hashnode&utm_medium=feed)

[Oct 3, 2023](https://hashnode.com/posts/javascript-this-callapplybind/651bc7c03122c41c70159245)

### [JavaScript - Hoisting 提升](https://yachuh.hashnode.dev/javascript-hoisting?utm_source=hashnode&utm_medium=feed)

Hoisting 是怎麼發生的？ 變數和函數的宣告會在編譯階段就被放入記憶體，但實際位置和程式碼中完全一樣。 從這段 MDN 對於 hoisting 的說明大概可以了解到，Javascript 在執行程式碼之前會先進行編譯，而在編譯的過程中會將變數宣告以及函式宣告提升 (hoist) 到該 scope 的頂端，但需注意這邊並非實際改動程式碼的位置。 JS 在運作時是分成「編譯」和「執行」兩個步驟。而 hoisting 是發生在編譯的階段。 JS 在編譯的階段會將變數及函式的宣告處理好（h...

3 min read · [yachuh.hashnode.dev](https://yachuh.hashnode.dev/javascript-hoisting?utm_source=hashnode&utm_medium=feed)

[Oct 3, 2023](https://hashnode.com/posts/javascript-hoisting/651bc63db5fbc9a995be1c6a)
