---
# System prepended metadata

title: "\U0001F3C5 Day 02 - 型別與宣告"
tags: [JS 直播班 - 2023 秋季班]

---

---
tags: JS 直播班 - 2023 秋季班
---
# 🏅 Day 02 - 型別與宣告

### 題目

以下兩題請合併為一份 CodePen 繳交，並透過「註解」進行回答。


問題一
---
以下變數 a, b, c, d, e, f 它們的值、型別各自為何? (請先想想看，不要用 console.log 檢查)

```javascript=
let a = "10" + "10";
let b = "10" * "10";
let c = 10 + "10";
let d = 10 * "10";
let e = 10 - "2";
let f = "10" - "2";
```
範例回答格式：
```javascript=
// 問題一：
// a = 值, 型別
// b = 值, 型別
```

問題二
---
請問以下題項哪些是有問題的，並說明為什麼。



``` js=
// 1
let myName = "jay";

// 2
var _state = true;

// 3
let true = true;

// 4
const 520Pretty = 520;

// 5
const appleNum = 10;
appleNum = 2;

// 6
var ming ='小明';
var ming = '小民';

// 7
const ming = '小明'; 
const ming = '小民'; 

// 8
let ming = '小明';
let ming = '小民'; 

// 9
let ming = '小明';
ming = '小民';

// 10
let $open = "芝麻開門';
```

範例回答格式：
```javascript=
// 問題二
// (2)，因為 blablabla 
// (3)，因為 balabababa 
```


## 回報流程

將答案寫在 CodePen 並複製 CodePen 連結貼至底下回報就算完成了喔! 
解答位置請參考下圖（需打開程式碼的部分觀看）

![](https://i.imgur.com/vftL5i0.png)

<!-- 解答：  

問題一：
a = "1010"，string
b = 100，number
c = "1010"，string
d = 100，number
e = 8，number
f = 8，number

問題二：
(3)，關鍵字不可以用來作為變數名稱
(4)，變數名稱的開頭不可以使用數字
(5)，const 不可以重新被指派值
(7)，因為 const 不可重複宣告，會呈現 Uncaught SyntaxError
(8)，因為 let 不可重複宣告，會呈現 Uncaught SyntaxError
(10)，"芝麻開門' 的引號必須成對

-->




回報區
---


|  # |     Discord     |                               CodePen / 答案                                |
|:--:|:---------------:|:---------------------------------------------------------------------------:|
|  1 |    ShangChu     |     [CodePen](https://codepen.io/shangchu0412/pen/vYvbxwy?editors=1010)     |
|  2 |    kuanju27     |            [CodePen](https://codepen.io/Eero-Chiao/pen/vYvbxMX)             |
|  3 |     詹姆士       |              [CodePen](https://codepen.io/z111048/pen/WNLPjQK)              |
|  4 |     pinyi_9     |        [CodePen](https://codepen.io/Wpypy/pen/NWeojPM?editors=1111)         |
|  5 |      保羅        |      [CodePen](https://codepen.io/paul-1997/pen/qBLgmGX?editors=0011)       |
|  6 |     Tina02      |       [CodePen](https://codepen.io/chjitlox-the-bashful/pen/xxmMrKr)        |
|  7 |      阿榮        |      [Codepen](https://codepen.io/codeitaday/pen/dywaWxJ?editors=0011)      |
|  8 |     Moreene     |              [CodePen](https://codepen.io/Moreene/pen/ZEVwyLB)              |
|  9 |    Chia Pin     |             [CodePen](https://codepen.io/joker-cat/pen/NWeogjW)             |
| 10 |       Zhu       |           [CodePen](https://codepen.io/codepenplayer/pen/LYMqyxR)           |
| 11 |   Celine 510    |      [CodePen](https://codepen.io/Celine-510/pen/GRPzEML?editors=1010)      |
| 12 |     yuling      |             [Codepen](https://codepen.io/igzdflpu/pen/PoXVjRM)              |
| 13 |    LinaChen     |             [Codepen](https://codepen.io/LinaChen/pen/VwqgWBq)              |
| 14 |    smalljie     |             [Codepen](https://codepen.io/smalljie/pen/oNJmwEP)              |
| 15 |      Oria       |        [Codepen](https://codepen.io/kajing/pen/KKbJqBN?editors=1111)        |
| 16 |      Helen      |    [Codepen](https://codepen.io/milkteamonster/pen/XWoOgGZ?editors=1010)    |
| 17 |      Peng       |        [Codepen](https://codepen.io/H-Peng/pen/bGOzRdP?editors=0010)        |
| 18 |      Alyce      |       [Codepen](https://codepen.io/alycehwy/pen/QWzYMgq?editors=0010)       |
| 19 |      Eden       |              [Codepen](https://codepen.io/iseden/pen/LYMqLOr)               |
| 20 |     ann6212     |       [Codepen](https://codepen.io/yqmegupa-the-styleful/pen/jOXdLGa)       |
| 21 |     hsu0921     |            [Codepen](https://codepen.io/HSUANIN0327/pen/RwEvZjr)            |
| 22 |       Zem       |              [Codepen](https://codepen.io/Potoro/pen/WNLPEBz)               |
| 23 |   swalok47716   |        [Codepen](https://codepen.io/swalok/pen/oNJmeQX?editors=0010)        |
| 24 |      白夜        |        [Codepen](https://codepen.io/Wei903/pen/ExGrmQK?editors=1111)        |
| 25 | 浪裡小白龍#6860   |        [Codepen](https://codepen.io/Emillo/pen/YzdBrqN?editors=0011)        |
| 26 | 奔跑吧(GTR150)   |       [Codepen](https://codepen.io/Wer-Qwe/pen/YzdBrPp?editors=1111)        |
| 27 |    santu0868    |            [Codepen](https://codepen.io/HatsumiSan/pen/MWZLEmM)             |
| 28 |      shiro      |          [Codepen](https://codepen.io/chenghsienwang/pen/rNoPGZO)           |
| 29 |  nini1202desu   |       [Codepen](https://codepen.io/tvxq5206/pen/LYMqzrW?editors=0010)       |
| 29 |      Dora       |        [Codepen](https://codepen.io/dorayu/pen/GRPzMLB?editors=1010)        |
| 30 |  xiaokui_71292  |             [Codepen](https://codepen.io/pen?template=OJrdzzW)              |
| 31 |      TTedd      |        [Codepen](https://codepen.io/TTedd/pen/PoXVEPP?editors=1012)         |
| 32 |       Uli       |              [Codepen](https://codepen.io/uli1313/pen/dywazoE)              |
| 33 |      Andy       |             [Codepen](https://codepen.io/andy31342/pen/qBLgVNp)             |
| 34 |      一畫        |         [Codepen](https://codepen.io/YH-K-the-selector/pen/gOZqoQg)         |
| 35 |   tanuki5863    |      [Codepen](https://codepen.io/tanuki320/pen/WNLPdZE?editors=1010)       |
| 36 |     lockon      |          [Codepen](https://codepen.io/Lockon-Stratos/pen/zYyeRzx)           |
| 37 |      IRIS       |             [Codepen](https://codepen.io/sz594380/pen/NWeoYJN)              |
| 38 |    ming0712     |            [Codepen](https://codepen.io/StevenHuang/pen/gOZqeqY)            |
| 39 |   荷菓かのり      | [Codepen](https://codepen.io/oogxwkvw-the-builder/pen/YzdBaeR?editors=0011) |
| 40 |     Ivy         |             [Codepen](https://codepen.io/Irene-Ke/pen/BavMxBj)              |
| 41 |     精靈         |      [Codepen](https://codepen.io/justafairy/pen/GRPzdXj?editors=0010)      |
| 42 |     Leo         |      [Codepen](https://codepen.io/Aruminiya/pen/BavMVam?editors=0011)      |
| 43 | 銀光菇 | [CodePen](https://codepen.io/genesynthesis/pen/VwqgdvK)|
| 44 | Alanna | [CodePen](https://codepen.io/AlannaYL/pen/zYyeazx)|
| 45 | kawa | [CodePen](https://codepen.io/z83xji6/pen/ExGrLLM?editors=0010)|
| 46 | Rxzan | [CodePen](https://codepen.io/Tzuru-Chen/pen/ZEVwopx)|
| 47 | ⭐️小正 | [CodePen](https://codepen.io/colorgolden/pen/YzdBvoe)|
| 48 | Fia | [CodePen](https://codepen.io/HHH_Ten/pen/gOZqKqj?editors=0010)|
| 49 | Jun_ | [CodePen](https://codepen.io/Jun-L/pen/dywajOe)|
| 50 | jimmy.0706 | [CodePen](https://codepen.io/WeiJun-Mao/pen/poqGZEj)
| 51 | 克里夫 Cliff | [CodePen](https://codepen.io/lanfbaea-the-animator/pen/NWeoBMq)
| 52 | MDFK | [CodePen](https://codepen.io/maywang/pen/GRPzBpY?editors=0012)
| 53 | gebyman | [CodePen](https://codepen.io/gebyman/pen/PoXVdwq?editors=0010)
| 54 | Winnie | [CodePen](https://codepen.io/codepen-io-winnie/pen/jOXdxgK?editors=0010)
| 55 | Luna | [CodePen](https://codepen.io/sfctsolp-the-sasster/pen/mdavjJG?editors=0010)
| 56 | jiayu | [CodePen](https://codepen.io/fjqxaznl-the-reactor/pen/eYbxLZM?editors=0010)
| 57 | Morning | [CodePen](https://codepen.io/sxzjnkxs-the-styleful/pen/bGOzWJZ?editors=0012)
| 58 | Allen | [CodePen](https://codepen.io/hlctw/pen/RwEvYGw)
| 59 | davidtt | [CodePen](https://codepen.io/David-Tsai/pen/LYMqJVq?editors=0011)
| 60 |hsuanlee1084 | [CodePen](https://codepen.io/hsuanlee1024/pen/VwqgGEL?editors=0010)
| 61 |CPing | [CodePen](https://codepen.io/CPing/pen/GRPzXwN)
| 62 |rogan6517 | [CodePen](https://codepen.io/RoganHsu/pen/qBLgVEP?editors=0010)
| 63 | sponge | [Code.pen](https://codepen.io/biunpujm-the-flexboxer/pen/BavMdZp)|
| 64 | yuan! | [Codepen](https://codepen.io/townyuan/pen/LYMqgPV)|
| 65 | Daylily | [Codepen](https://codepen.io/daylily/pen/gOZqBxo)|
| 66 | SHUO | [Codepen](https://codepen.io/xrzarxkl-the-reactor/pen/jOXdevR)|
| 67 | ChrisSQR | [Codepen](https://codepen.io/ChrisSQR/pen/Vwqgqyw)|
| 68 | Mattie | [Codepen](https://codepen.io/mattielin/pen/gOZqZZg?editors=0010)|
| 69 | celinelinnn | [Codepen](https://codepen.io/celinephoebe/pen/mdavgpe)
| 70 | JasonFu | [Codepen](https://codepen.io/jie-Fu/pen/wvRNLKO)|
| 71 | 楓仔 | [Codepen](https://codepen.io/maplestartend/pen/vYvPBpZ)|
| 72 | claire | [Codepen](https://codepen.io/yi-wen-chen/pen/YzdgKaQ?editors=1111)|
| 73 | neo_1104 | [Codepen](https://codepen.io/eipakoeq-the-animator/pen/dywrbQR)|
| 74 | Ching | [Codepen](https://codepen.io/tzuchingg/pen/wvROvwR?editors=0010)|
| 75 | runweiting | [CodePen](https://codepen.io/weiting14/pen/PoXLoav)     |
| 76 | 小夏 | [CodePen](https://codepen.io/michaelhsia/pen/VwqRwNq) |
| 77 | 依依 | [CodePen](https://codepen.io/Rita-Yang/pen/JjwzjmL?editors=0010) |
| 78 | cest_jessie | [Codepen](https://codepen.io/itsjessiechen/pen/YzdgPPM) |
| 79 | Peggy | [Codepen](https://codepen.io/peggylai/pen/VwqRYzo?editors=1010) |
| 80 | minnielin | [Codepen](https://codepen.io/ShengXin-Lin/pen/dywroOX) |
| 81 | RX00 | [Codepen](https://codepen.io/llqzknqv-the-styleful/pen/BavbNNw) |
| 82 | 蛋塔| [Codepen](https://codepen.io/Hong-Game1/pen/OJrqVgz?editors=1111)|
| 83 | shuuu | [Codepen](https://codepen.io/afjrvjzl-the-bashful/pen/PoXLqzK?editors=1011) |
| 84 | sunny_08149 | [Codepen](https://codepen.io/Sunny-Lin/pen/JjwzYby) |
| 85 | patrickpie | [Codepen](https://codepen.io/patrickpie/pen/jOXJqrp?editors=0010) |
| 86 | 風羽 | [Codepen](https://codepen.io/Joy-Huang/pen/gOZErgx?editors=0010) |
| 87 | yuan2781 | [Codepen](https://codepen.io/ismebir/pen/LYMaNdR) |
| 88 | Yijing | [Codepen](https://codepen.io/Yi-Jing-71080635/pen/rNoRMWd?editors=1011) |
| 89 |yayaya1876|[Codepen](https://codepen.io/spwasfgd-the-lessful/pen/JjwzbgE)
| 90 |judy123|[Codepen](https://codepen.io/tsong-h/pen/vYvPxWB?editors=1011)
| 91 |ss585801|[Codepen](https://codepen.io/ss585801/pen/KKbEWVW?editors=1112)
| 92 | phyllis_0802 | [Codepen](https://codepen.io/Phyllis-Cheng/pen/rNoRyPq) |
| 93 |skypassion5000|[Codepen](https://codepen.io/skypassion5000/pen/gOZEWrW?editors=0010)
| 94 | damon0323 | [Codepen](https://codepen.io/swk9eny2/pen/abPMWqO?editors=0010) |
| 95 | MY | [Codepen](https://codepen.io/ahmomoz/pen/JjwzJbJ) |
| 96 | Noah | [Codepen](https://codepen.io/pen/?editors=1111) |
| 97 | skylaaa | [Codepen](https://codepen.io/chihyu2790/pen/YzdgxRP) |
| 98 | neo_1104 | [Codepen](https://codepen.io/eipakoeq-the-animator/pen/dywrbQR) |
| 99 |Sean Chang| [Codepen](https://codepen.io/windfantasy4/pen/PoXLmEE)|
| 100 |shiang| [Codepen](https://codepen.io/Bo-Shiang/pen/ExGMpQm)|
| 101 |Lucy| [Codepen](https://codepen.io/JingHuei/pen/dywrXyV?editors=0012)|
| 102 |hsiu8767| [Codepen](https://codepen.io/hsiu8767/pen/qBLvMee?editors=0010)|
| 103 |Ataraxia| [Codepen](https://codepen.io/ataraxia8888/pen/vYvpQdM)|
| 104 |  Jerry  | [Codepen](https://codepen.io/ildkosxk-the-encoder/pen/NWeJeKq)|
| 105 |  Hank._.z  | [Codepen](https://codepen.io/linoiaby-the-sans/pen/yLGwZMR)
| 106 | penny_41707 | [Codepen](https://codepen.io/penny-wang-the-flexboxer/pen/gOZEEdq)
| 107 |  macihuang  | [Codepen](https://codepen.io/macy1215/pen/NWeJJoW)
| 108 |  Lychee KK  | [Codepen](https://codepen.io/kakakala/pen/yLGwdOB)
| 109 |  Fabio20  | [Codepen](https://codepen.io/fabio7621/pen/abPMePP?editors=0110)
| 110 |  白熊  | [Codepen](https://codepen.io/WhiteBearChen/pen/bGOJGbm?editors=1011)
| 111 | YIN | [Codepen](https://codepen.io/andy888jam/pen/ZEVZEeG)
| 112 | 小廷 | [Codepen](https://codepen.io/uyxkiake-the-selector/pen/NWemWJW?editors=0011)
| 113 | yu.t_liu | [Codepen](https://codepen.io/YuT200053/pen/WNLWbqE?editors=0011)
| 114 | akihico1116 | [Codepen](https://codepen.io/akihico/pen/JjwVEmr?editors=1010)
| 115 |PH | [Codepen](https://codepen.io/lokf9527/pen/vYvMxYQ)
| 146 | xuan | [Codepen](https://codepen.io/xuan0915/pen/ZEVZezL?editors=0012)
| 117 | Lainie1931 | [Codepen](https://codepen.io/Lainie88/pen/dywLWGy?editors=1011)
| 118 | OSN | [Codepen](https://codepen.io/osncodepen/pen/BavEdyX)
| 119 | Ccccc | [Codepen](https://codepen.io/CyreneTsai/pen/dywLVJG)
| 120 | zona | [Codepen](https://codepen.io/w242920/pen/bGOJYWO)
| 121 | Befun | [Codepen](https://codepen.io/richard260572/pen/VwqNxKE?editors=1111)
| 122 |維哲| [Codepen](https://codepen.io/kwz1202/pen/ZEVZjZO?editors=1112)
| 123 |JUNEW| [Codepen](https://codepen.io/June-W/pen/dywLQdV?editors=0010)
| 124 | shcpoy | [Codepen](https://codepen.io/shcopy/pen/WNLWMqg)
| 125| hsuhsusophie|[codepen](https://codepen.io/hsuhsusophie/pen/zYyXXgL?editors=1111)
| 126| Iris|[codepen](https://codepen.io/iris831206/pen/ExGJzYd)
| 127| xin|[codepen](https://codepen.io/Estherrrrrr999/pen/WNLWqJW)
|128| xuanxuan0127|[CodePen](https://codepen.io/Bonnie-Sung/pen/wvRbgPE?editors=1010)
|129| QOO |[CodePen](https://codepen.io/QOOQOOQ/pen/LYMaYpz?editors=0011)
|130| jojo2824 |[CodePen](https://codepen.io/joanne-wei/pen/bGOyqXe)
|131| 皆順#1616 |[CodePen](https://codepen.io/koba60052ww/pen/RwEmZvz?editors=0011)
| 132 | 郭芙蘭#6374| [CodePen](https://codepen.io/flora_Kuo/pen/VwqOyax?editors=1111) 
| 133 | Joy chiang| [CodePen](https://codepen.io/fwysphbw-the-vuer/pen/RwEmYzz?editors=1112) 
| 134 | kebukeyi| [CodePen](https://codepen.io/kebukeyi/pen/GRPaPoY) 
| 135 | Vivian2857| [CodePen](https://codepen.io/uojbohed-the-solid/pen/JjwqxpV) 
| 136 | yaoling.liang | [CodePen](https://codepen.io/Yao-Ling-L-/pen/dywBWex)
| 137 | Jeff | [CodePen](https://codepen.io/nonwaaa/pen/XWoLMQe)
| 138 | 地球儀 | [CodePen](https://codepen.io/dayday1222/pen/poqXLpq?editors=0010)
| 139 | 阿賀#3700 | [CodePen](https://codepen.io/sungho/pen/WNLqRya)
| 140 | cosmos7755 | [CodePen](https://codepen.io/violet7755/pen/xxmEVbV)
| 141 | 歐陽龍龍#1061 | [CodePen](https://codepen.io/dizzydog-rgb/pen/wvRVebj)
| 142 | 阿維#2569 | [CodePen](https://codepen.io/iijojpli-the-looper/pen/eYbqXmK?editors=0010)
| 143 | KUN. | [CodePen](https://codepen.io/barry91205/pen/KKJPwOw)
| 143 | Toby | [CodePen](https://codepen.io/Toby-L/pen/rNPBdzZ)
| 144 | Martin | [CodePen](https://codepen.io/markyourpage/pen/RwvwMrm)
|145|nikkita_3544|[CodePen](https://codepen.io/vanessa7259/pen/OJdPMoz?editors=0010)|
|146|ssshane|[CodePen](https://codepen.io/sam6091260/pen/mdvPzoO?editors=0010)|
|147|楓尋|[CodePen](https://codepen.io/Lnight0/pen/bGzpyXa)|
|148|Rochel|[Codepen](https://codepen.io/rochelwang1205/pen/eYxWEKQ?editors=0010)|
|149|bf_tsai|[Codepen](https://codepen.io/BF-Tsai/pen/ExrpMev)|
|150|NathanJames|[Codepen](https://codepen.io/ufo060204/pen/poGOwbM)|
|151|雪維|[Codepen](https://codepen.io/Shawey/pen/ZYzxYde)|