---
# System prepended metadata

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

---

---
tags: JS 直播班 - 2024 秋季班
---
# 🏅 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 / 答案 |
| :---: | :-----: | :-----: |
| 01  | Jainee | [CodePen](https://codepen.io/Jainee0110/pen/rNXOXKG) | 
| 02  | ABow_Chen | [CodePen](https://codepen.io/fred39392001/pen/ExqVqrL) |
| 03  | ABOOS | [CodePen](https://codepen.io/guhungyin/pen/oNKbvvV?editors=0010) | 
| 04  | jimmy.0706 | [CodePen](https://codepen.io/JimmyMao/pen/QWeyLjv?editors=0011) | 
| 05 | Lobinda | [CodePen](https://codepen.io/Lobinda/pen/ExqPYxe)|
| 06 | tim | [CodePen](https://codepen.io/jskrtivy-the-animator/pen/PoMZYpG?editors=1010)|
| 07 | voke | [CodePen](https://codepen.io/FiSi-the-lessful/pen/bGXEbWW) | 
|08|Hailey|[Codepen](https://codepen.io/sxbokfja-the-flexboxer/pen/ZEgQzaM?editors=1011)|
|09|泊岸|[Codepen](https://codepen.io/qoq77416416/pen/GRVoKOq?editors=0010)|
|10| Tatsu | [CodePen](https://codepen.io/chindesu0207/pen/VwoeZQL) | 
| 11 | Toung | [CodePen](https://codepen.io/Toung/pen/PoMZYep) | 
| 12 | xcx100 | [CodePen](https://codepen.io/c13026/pen/mdNVdbm?editors=0010) | 
| 13 | Jack | [CodePen](https://codepen.io/kxbhixte-the-sasster/pen/MWNKWgL?editors=0010)| 
| 14 | Hedwig | [CodePen](https://codepen.io/adirehfz-the-encoder/pen/poMgoJq?editors=1111)| 
| 15 | a1phaki(小k) | [CodePen](https://codepen.io/a1phaki/pen/OJKMLag) |
| 16 | 地瓜 | [CodePen](https://codepen.io/huangtzuchin/pen/yLmeLPd) | 
| 17 | brucelee0629| [CodePen](https://codepen.io/xxhdklwi-the-decoder/pen/wvVMvXQ?editors=0011) | 
| 18 | Kaya| [CodePen](https://codepen.io/kayaribi/pen/RwXrNbB) | 
| 19 | Ana | [Codepen](https://codepen.io/Ana-Wu/pen/wvVMBwZ?editors=0010) |
| 20 | 毛巾 | [Codepen](https://codepen.io/bqdcjboa-the-solid/pen/yLmeyoa) |
|  21   |   Ariel    | [CodePen](https://codepen.io/ariel0510/pen/VwoeLWw?editors=0011) |
|  22   |   david1819    | [CodePen](https://codepen.io/David-Lin-the-vuer/pen/rNXxVZP) |
|  23   |   Mars    | [CodePen](https://codepen.io/MarsKuo/pen/wvVMMwZ) |
|  24   | CrystalLala      | [CodePen](https://codepen.io/crystallala/pen/gOVPPWy) | 
|  25   | GTR150    | [CodePen](https://codepen.io/Wer-Qwe/pen/rNXxeYq) | 
|26|陳睿睿|[CodePen](https://codepen.io/uwmrsusb-the-solid/pen/BaXjKRQ?editors=0011)|
|  27   | mercury2508. | [CodePen](https://codepen.io/Mercury2508/pen/QWeybRx) |
|  28   | Sonia | [CodePen](https://codepen.io/YUJOU/pen/ExqPKdz?editors=0010) |
|  29   | ycl325.etheddie | [CodePen](https://codepen.io/wdvikfuz-the-selector/pen/rNXxMVM) |
|  30   | Mos | [CodePen](https://codepen.io/mos25399/pen/wvVMozo) |
|  31   | yuling | [CodePen](https://codepen.io/yu-ling-peng/pen/xxvZRqM?editors=0111) |
|  32   | JRz | [CodePen](https://codepen.io/JRZHENG/pen/poMgReY?editors=0011) |
|  34  | Chiu Hsin | [CodePen](https://codepen.io/hsin-ya/pen/KKOVWGN) | 
|  35  |GAVI| [CodePen](https://codepen.io/qbafldcv-the-scripter/pen/bGXEWRq) | 
|   36  | JIA      | [CodePen](https://codepen.io/nzaicwlw-the-styleful/pen/WNVrjjO?editors=0010) |
|  37  |  yuyeh_1212  | [CodePen](https://codepen.io/yuyeh1212/pen/WNVrONJ) |
|   38  |   Emma    | [CodePen](https://codepen.io/Emma0919/pen/oNKboxx) | 
|   39  |   chuehtim    | [CodePen](https://codepen.io/ueqfnhqt-the-encoder/pen/MWNKOdY) | 
|   40  |   KOMATSU PEI   | [CodePen](https://codepen.io/Komatsu2021/pen/xxvZZVX?editors=0010) |
|   41  |   Lotte   | [CodePen](https://codepen.io/hmkdoxuj-the-decoder/pen/jOgWzqv?editors=0110) |
|   42  |欸比( ꒪⌓꒪)| [CodePen](https://codepen.io/WanTzu-Chiang/pen/rNXxdEx?editors=0012) |
|   43  |是在哈囉| [CodePen](https://codepen.io/miyxdhem-the-solid/pen/VwoexvQ) |
|   44  |   chris    | [CodePen](https://codepen.io/chris-chen-the-selector/pen/GRVodpX?editors=0010) | 
|  45   |610| [CodePen](https://codepen.io/YI-LING-LIU/pen/WNVrJMv) |
| 46 | 邵 |[Codepen](https://codepen.io/ukscrlno-the-typescripter/pen/KKOVRoz?editors=1111)|
| 47 | 湘湘 |[Codepen](https://codepen.io/siangsiang/pen/eYqJMbN?editors=0011)|
| 48 | Ellie |[Codepen](https://codepen.io/Ellie-Chiang/pen/NWQxzKr)|
| 49 | 嚼勁先生 |[Codepen](https://codepen.io/James520284/pen/dyxGeVK)|
| 50 | Timo |[Codepen](https://codepen.io/timothy833/pen/gOVPKbO)|
| 51 | 倫倫 |[Codepen](https://codepen.io/f5badapple/pen/Yzmwvgw?editors=0011)|
| 52 | Dolce_墨 |[Codepen](https://codepen.io/DolceTseng1026/pen/poMgZRq)|
| 53 | 黛西 | [CodePen](https://codepen.io/ChiashengLin/pen/poMgZKm) | 
| 54 | zobody | [CodePen](https://codepen.io/Zoe-Shih/pen/jOgqbVp) | 
| 55 |  瑞斯Darius_TszYing | [CodePen](https://codepen.io/bekgnohe-the-selector/pen/yLmeGgY?editors=0010)|
|  56   |     Celine| [CodePen](https://codepen.io/szuning/pen/NWQxomw) | 
|57|朋仔|[CodePen](https://codepen.io/YPHUANG/pen/gOVPyyV?editors=0010) |
|58|陳小廷|[CodePen](https://codepen.io/ting1124/pen/yLmeWMz?) |
|59|alec1203|[CodePen](https://codepen.io/soloayaya/pen/zYgrbQq?editors=1111) |
|60|Puling.|[CodePen](https://codepen.io/Puling/pen/YzmqqZo?editors=0010) |
|61|leoli35|[CodePen](https://codepen.io/ziku10121/pen/dyxMXrW?editors=0011) |
|62|kaka_945|[CodePen](https://codepen.io/kay945/pen/NWQNbdR) |
| 63   | ji3di | [ codepen](https://codepen.io/jwuuhtxh-the-builder/pen/QWeNvEK?editors=0011) |
| 64   | zen | [ codepen](https://codepen.io/zen742937/pen/gOVrWxp) |
|  65  |  cbs9007  |[CodePen](https://codepen.io/wasdjk/pen/YzmqVro)|
|  66  |  Satar  |[CodePen](https://codepen.io/SatarKuo/pen/LYwNmpy?editors=0011)|
|  66  |  jerry_66983  |[CodePen](https://codepen.io/Barry-C/pen/zYgqLqb)|
|  67  |  野鴿  |[CodePen](https://codepen.io/HoshinoSyouta/pen/eYqZQyo?editors=0011)|
|  68  |  anderson666  |[CodePen](https://codepen.io/goodmanbuild/pen/jOgqJEY)|
| 69 | joylu0902 |[CodePen](https://codepen.io/joylu0902/pen/MWNydZQ)|
| 70 | Ed Huang |[CodePen](https://codepen.io/yide1986/pen/abeNeVp)|
| 71 | Rogan |[CodePen](https://codepen.io/RoganHsu/pen/XWvKXbJ)|
| 72 | zen |[CodePen](https://codepen.io/zen742937/pen/gOVrWxp)|
| 73 | charlottelee |[CodePen](https://codepen.io/char849/pen/MWNeyKJ)|
| 74 | yu |[CodePen](https://codepen.io/yu_ch12/pen/wvVWzdQ)|
| 75 | Seris |[CodePen](https://codepen.io/Dale-Chien/pen/QWeEqBG)|
| 76 | 黛Dye |[CodePen](https://codepen.io/Dye_Note/pen/KKOMyRB)|
| 77 | Lianne |[CodePen](https://codepen.io/Elaina-L/pen/OJKXQQP)|
| 78 | Shiloh |[CodePen](https://codepen.io/vhswacvv-the-sasster/pen/NWQroJR?editors=0111)|
| 79 | Martin |[CodePen](https://codepen.io/wyipzpnh-the-decoder/pen/BaXLaMw?editors=0010)|
| 80 | Mike |[CodePen](https://codepen.io/mike2049/pen/YzmGNeX?editors=0010)|
|81|蘑菇星星|[CodePen](https://codepen.io/brrrieon-the-vuer/pen/OJKRgXN?editors=0011)|
|82|Ollie|[Codepen](https://codepen.io/daiyy97/pen/oNKzOez?editors=0010)|
| 83   | jing6408 | [CodePen](https://codepen.io/qqjuyjat-the-builder/pen/QWeKPzo)|
| 84 | haojing | [CodePen](https://codepen.io/hjxu/pen/OJKbNeL)|
| 85 | Joannehu | [CodePen](https://codepen.io/nelbabkv-the-flexboxer/pen/MWNJEjN)|
| 86 | Kasie | [CodePen](https://codepen.io/KasieL/pen/bGXgYpG)|
| 87 | yoishere | [CodePen](https://codepen.io/yoishere/pen/WNVpzoe)|
| 88 | xiang5141 | [CodePen](https://codepen.io/XIANG-XIANG/pen/xxvqzyE?editors=0010)|
| 89 | emmazhang | [CodePen](https://codepen.io/zhangemma/pen/PoMpdBb?editors=0010)|
|90|Avis|[CodePen](https://codepen.io/avisstian/pen/wvVdzRJ?editors=0010)
|91|Jim|[CodePen](https://codepen.io/JimChou/pen/jOgLEqP?editors=0011)
|92|yaoling.liang|[CodePen](https://codepen.io/Yao-Ling-L-/pen/yLmzqoQ?editors=1011)
|92|Kim|[CodePen](https://codepen.io/kim0101__/pen/RwXjrKQ)
|93|iamcan|[CodePen](https://codepen.io/uhnxswdq-the-typescripter/pen/GRVGKex)
|94|OZ|[CodePen](https://codepen.io/OZ_design/pen/MWNXvJE?editors=0010)
|95|Amy(咂摳)|[CodePen](https://codepen.io/nnxucgmc-the-builder/pen/bGXxqdP?editors=0011)
|96|Nocab Wang ( 培根 )|[CodePen](https://codepen.io/PeihanWang/pen/bGXmozW?editors=0012)
|97|Vivian|[CodePen](https://codepen.io/vivian-hsiao/pen/GRVVvKY?editors=1111)
|98|Anna|[Codepen](https://codepen.io/Anna-Teng/pen/MYgjwvB?editors=0010)
|99|Chuang|[Codepen](https://codepen.io/uidoytjq-the-solid/pen/vEBJYKQ)


<!-- 
|   |  |   [Codepen](作業網址放這邊) | 
-->