---
# System prepended metadata

title: "\U0001F3C5 Day 04 - 型別陷阱題"
tags: [JS 直播班 - 2022 秋季班]

---

---
tags: JS 直播班 - 2022 秋季班
---
# 🏅 Day 04 - 型別陷阱題

### 題目

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

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

```jsx=
let a = true + true ;
let b = false + 123 ;
let c = null + 123 ;
let d = null + '123';
```

範例回答格式：
```javascript=
// a = 值, 型別
// b = 值, 型別
```


## 回報流程

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

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

<!-- 解答：  

a = 2, number
b = 123, number
c = 123, number
d = 'null123', string

補充文章：https://ithelp.ithome.com.tw/articles/10191180
-->




回報區
---


|        Discord        |                                  CodePen / 答案                                  |
|:---------------------:|:--------------------------------------------------------------------------------:|
|      嗶嗶羊#8042      | [CodePen](https://codepen.io/mazizlte-the-typescripter/pen/ExLeyWp?editors=0010) |
|       瑋慶#2480       |    [CodePen](https://codepen.io/htzwgoqt-the-looper/pen/xxjaKKg?editors=1111)    |
|       Tami#6742       |     [CodePen](https://codepen.io/wqsdqbjn-the-vuer/pen/jOxpJXZ?editors=0010)     |
|        YC#2522        |                  [CodePen](https://codepen.io/YCLu/pen/BaxPKyE)                  |
|      君Jyun#0147      |         [codepen](https://codepen.io/Okaybeok/pen/xxjJBQN?editors=0010)          |
|       Ayre#0016       |        [Codepen](https://codepen.io/yichunlin09/pen/NWMBJow?editors=0010)        |
|       威0#6919        |        [Codepen](https://codepen.io/n0918679182/pen/qBYyvvW?editors=0011)        |
|    hsiung阿熊#4079    |               [Codepen](https://codepen.io/hsiungchi/pen/poVZYqV)                |
|       kuku#3118       |        [Codepen](https://codepen.io/mengting-ku/pen/qBYyvwW?editors=0010)        |
|     AuroraC#6539      |          [codepen](https://codepen.io/AuroraC/pen/poVZYBK?editors=1010)          |
|       CloThEs#        |                [codepen](https://codepen.io/CloThEsZ/pen/gOzjENm)                |
|    shinyhung#3825     |                 [codepen](https://codepen.io/pen/?editors=1111)                  |
|    jackson204#6363    |               [codepen](https://codepen.io/jackson204/pen/dyejrxY)               |
|      albee#9121       |        [Codepen](https://codepen.io/albee-chang/pen/QWrBoem?editors=1010)        |
|       薯餅#3581       |             [Codepen](https://codepen.io/ColdingPoTaTo/pen/NWMBJZX)              |
|       芮綺#5224       |          [Codepen](https://codepen.io/zhan70/pen/abGjxoe?editors=0010)           |
|      Judy☻ #7874      |         [CodePen](https://codepen.io/hsiaohan/pen/BaxPEBw?editors=1011)          |
|    出事了阿伯#9923    |        [Codepen](https://codepen.io/BradpittLai/pen/YzLjgoq?editors=1010)        |
|      肉桂卷#0625      |          [Codepen](https://codepen.io/ginnlee/pen/ExLpMqB?editors=0011)          |
|    jimmyFang#9575     |         [Codepen](https://codepen.io/pohxiqqo/pen/KKRBYdx?editors=0010)          |
|       教練#6451       |             [Codepen](https://codepen.io/monkeybear721/pen/dyejLXX)              |
|      Clara#1275       |         [Codepen](https://codepen.io/bsupixqu/pen/RwyBOGp?editors=0011)          |
| 軟綿綿 (๑•ᴗ•๑) ♡#3627 |       [CodePen](https://codepen.io/Connie-Chien/pen/NWMBmRM?editors=0011)        |
|      CofCat#9226      |         [CodePen](https://codepen.io/cofcat456/pen/YzLjMGp?editors=1011)         |
|       m_m#5493        |               [Codepen](https://codepen.io/minnn7716/pen/RwyBOKV)                |
|        VT#0895        |                 [Codepen](https://codepen.io/vt197/pen/rNvrbyX)                  |
|     yoshidc#0455      |                [CodePen](https://codepen.io/yoshiyyc/pen/MWGBRvd)                |
|     hannahTW#2224     |         [Codepen](https://codepen.io/hangineer/pen/bGMjJRK?editors=0011)         |
|      Iris_#8462       |                 [Codepen](https://codepen.io/pen/?editors=1111)                  |
|      哈囉哈#5196      |              [Codepen](https://codepen.io/bill0841205/pen/ExLpJoj)               |
|      amy芳#1385       |               [Codepen](https://codepen.io/amy-chieng/pen/RwyBOML)               |
|       Gill#9280       |               [Codepen](https://codepen.io/Gill-Chin/pen/MWGBVKr)                |
|     PayRoom#8328      |               [Codepen](https://codepen.io/water38198/pen/poVZBWY)               |
|      黑白兔#0684      |               [Codepen](https://codepen.io/johnny329/pen/dyejLgR)                |
|    Potatolee#7749     |               [Codepen](https://codepen.io/potatoleee/pen/qBYywKq)               |
|     Hironaka#7367     |       [Codepen](https://codepen.io/Hironaka0815/pen/vYjaMze?editors=0010)        |
|      Hazel.#6020      |        [Codepen](https://codepen.io/Hazelhsieh/pen/MWGBRBN?editors=1010)         |
|      心幻羽#0056      |        [Codepen](https://codepen.io/linglingsyu/pen/gOzjyqK?editors=1111)        |
|       母湯#7211       |        [Codepen](https://codepen.io/tommyshih77/pen/zYjLXXq?editors=0010)        |
|       Peng#9811       |         [Codepen](https://codepen.io/peng-027/pen/eYrjoQm?editors=1011)          |
|       阿風#6890       |                [Codepen](https://codepen.io/Afonguwu/pen/QWrBPPP)                |
|      Chung#5951       |                 [Codepen](https://codepen.io/yuju16/pen/RwyBOmM)                 |
|      Benson#6763      |                [Codepen](https://codepen.io/kumashow/pen/dyejmGE)                |
|      法希娜#3206      |          [Codepen](https://codepen.io/yiiserpf-the-encoder/pen/poVZBXz)          |
|       Yiru#0236       |          [Codepen](https://codepen.io/yiru94/pen/abGjxeB?editors=0010)           |
|      cotton#7163      |          [Codepen](https://codepen.io/cottonT/pen/ExLpJzg?editors=1011)          |
|      hungya#0773      |         [Codepen](https://codepen.io/hungya777/pen/MWGBRXN?editors=0010)         |
|    KatyChiang#1554    |          [Codepen](https://codepen.io/Kai0819/pen/yLjqWyy?editors=1011)          |
|       威爾#1694       |                [CodePen](https://codepen.io/WILL_Wu/pen/zYjLQxK)                 |
|      Lucie#3831       |                [CodePen](https://codepen.io/bisespei/pen/qBYywxa)                |
|      JackC#0411       |                [CodePen](https://codepen.io/key0329/pen/bGMjydJ)                 |
|       無名#6427       |                [CodePen](https://codepen.io/Nomoney/pen/BaxPeNM)                 |
|      Cliff#4606       |               [Codepen](https://codepen.io/Cliff_hex/pen/GRdBagB)                |
|       艸良#2846       |              [Codepen](https://codepen.io/momoninainai/pen/zYjLzGL)              |
|      Hilda#7085       |           [Codepen](https://codepen.io/vwquikad-the-vuer/pen/XWqBwKN)            |
|    JustinLiu#9699     |        [CodePen](https://codepen.io/justin0227/pen/oNdMRYE?editors=0011)         |
|   jacky010080#0880    |       [CodePen](https://codepen.io/Yen-Jung-Chen/pen/GRdBamP?editors=0010)       |
|      azami#5986       |                 [Codepen](https://codepen.io/azami/pen/QWrBRgw)                  |
|      Greta#0837       |                [Codepen](https://codepen.io/gretali/pen/XWqBwpp)                 |
|       圈圈#4060       |           [Codepen](https://codepen.io/wjejfczn-the-bold/pen/JjvBVXd)            |
|     jamesccc#6244     |   [Codepen](https://codepen.io/nimwnynv-the-sasster/pen/BaxPemg?editors=1111)    |
|      yawun#0042       |               [CodePen](https://codepen.io/monicalin/pen/PoeBvBr)                |
|      Winnie#1306      |      [Codepen](https://codepen.io/WinnieWuWinnie/pen/MWGBdPp?editors=0010)       |
|     泰泰泰泰#0582     |   [Codepen](https://codepen.io/tesdzzph-the-bashful/pen/gOzjJEV?editors=1010)    |
|    suihsilan#9485     |         [Codepen](https://codepen.io/suihsilan/pen/poVZmMe?editors=0010)         |
|       末次#0236       |                [Codepen](https://codepen.io/yunjulee/pen/KKRBjwW)                |
|       Rice#8043       |         [Codepen](https://codepen.io/riecball/pen/yLjqdLX?editors=0011)          |
|      楓之聲#6945      |               [Codepen](https://codepen.io/sshane258/pen/rNvrEap)                |
|      ssozr#4680       |           [codepeb](https://codepen.io/ssozr/pen/PoeBrPq?editors=0011)           |
|        Rr#2215        |              [Codepen](https://codepen.io/rufangcheng/pen/RwyBzrX)               |
|       柔柔#1716       |                [codepeb](https://codepen.io/rouchen/pen/vYjaqLq)                 |
|       Fan#3405        |                 [codepen](https://codepen.io/Fan123/pen/XWqBLMY)                 |
|   魚子醬cavier#5220   |                [codepan](https://codepen.io/haihsuan/pen/gOzjNWa)                |
|     KC_8685#9343      |               [codepan](https://codepen.io/cathy7411/pen/poVZYvP)                |
|     banazit#5143      |         [Codepen](https://codepen.io/banazita/pen/gOzjNXr?editors=1111)          |
|      Velma#1693       |          [Codepen](https://codepen.io/Ze1225/pen/XWqBLqx?editors=0010)           |
|      meimei#1693      |                [Codepen](https://codepen.io/isnrudav/pen/KKRBjxQ)                |
|     AkiHico#9239      |          [Codepen](https://codepen.io/akihico/pen/GRdBbYq?editors=1010)          |
|       yumy#1940       |               [Codepen](https://codepen.io/yumy_yamg/pen/RwyBzdR)                |
|      Barret#1119      |        [Codepen](https://codepen.io/barret0720/pen/BaxPgeZ?editors=0010)         |
|       Rena#6249       |              [Codepen](https://codepen.io/aureate0116/pen/dyejxMM)               |
|      yishan#4902      |   [Codepen](https://codepen.io/gdjrehhw-the-animator/pen/ExLpqVq?editors=0010)   |
|   William Lai#0196    |               [Codepen](https://codepen.io/lai-weihan/pen/MWGBNoR)               |
|    0xWilliam #8796    |             [Codepen](https://codepen.io/0xWilliam0322/pen/ZEojgXd)              |
|       雷雷#7844       |        [Codepen](https://codepen.io/lei-yi-jie/pen/XWqBvar?editors=1010)         |
|      Milvii#7431      |              [CodePen](https://codepen.io/Monstertroll/pen/VwxGZYy)              |
|       小白#2406       |               [CodePen](https://codepen.io/gracewhite/pen/jOxpRgj)               |
|    Yuna Huang#2692    |         [CodePen](https://codepen.io/Yuna1002/pen/bGMxbWP?editors=0010)          |
|     Jamie Wu#9345     |                [Codepen](https://codepen.io/Wu220103/pen/oNdMrBO)                |
|       cbs#9007        |                 [CodePen](https://codepen.io/wasdjk/pen/poVOzrg)                 |
|       CJ07#0176       |         [Codepen](https://codepen.io/cjtseng07/pen/oNdPvEd?editors=0011)         |
|     Amberhh#2465      |                [Codepen](https://codepen.io/Amberhh/pen/JjvBzzg)                 |
|     DaisyLi#4231      |    [CodePen](https://codepen.io/lidairong-gmail-com/pen/oNdPNxm?editors=0012)    |
|      homer#1525       |                [CodePen](https://codepen.io/Buckhorn/pen/bGMxGEe)                |
|        富#0389        |        [CodePen](https://codepen.io/spring40747/pen/abGabWR?editors=1111)        |
|        YI#0863        |          [CodePen](https://codepen.io/YI0305/pen/jOxvOzG?editors=0012)           |
|     Joy1712#4670      |          [CodePen](https://codepen.io/Joy1712/pen/poVOvEQ?editors=1111)          |
|     FiReBrO#0557      |         [CodePen](https://codepen.io/firebro42/pen/PoedwbJ?editors=1111)         |
|      Baozi#2042       |               [CodePen](https://codepen.io/lillianyu/pen/MWGqYaZ)                |
|       yen#5757        |       [CodePen](https://codepen.io/TZU-HUANG-YEN/pen/oNdPgqY?editors=1010)       |
|     我是泇吟#5189     |                [CodePen](https://codepen.io/kljuqbxs/pen/BaxOygq)                |
|    AmberWang#2504     | [CodePen](https://codepen.io/dmpjhhtt-the-typescripter/pen/MWGqwLp?editors=0010) |
|      SASIMI#5099      |              [CodePen](https://codepen.io/sashimi1327/pen/KKRxwRE)               |
|      yiling#4054      |          [CodePen](https://codepen.io/lin010/pen/KKRxdyX?editors=0011)           |
|     beta lin#1445     |                [CodePen](https://codepen.io/linbeta/pen/XWqPmEP)                 |
|    SunnyCheng#4113    |         [CodePen](https://codepen.io/Sunny0509/pen/LYmJpdo?editors=1111)         |
|       朧.#9548        |             [CodePen](https://codepen.io/crushing_omega/pen/abGavQM)             |
|       Data#9297       |               [CodePen](https://codepen.io/kirakira72/pen/dyeqGPY)               |
|       鑫鑫#4346       |         [CodePen](https://codepen.io/Neil1024/pen/LYmJGOZ?editors=0011)          |
|    poetry1933#2713    |        [CodePen](https://codepen.io/poetry1932/pen/GRdXoQO?editors=0010)         |
|     RayChen#6088      |              [CodePen](https://codepen.io/raychen1996/pen/KKRxVJL)               |
|       shio#1414       |          [CodePen](https://codepen.io/shioyen/pen/xxjaZvR?editors=1111)          |
|      黃士桓#7654      |      [codePen](https://codepen.io/shr-huan-huang/pen/ExLePGP?editors=0010)       |
|       Ohno#1144       |         [Codepen](https://codepen.io/mmaa7850/pen/abGadve?editors=1111)          |
|     mandylai#4055     |        [codePen](https://codepen.io/mandy-lai-2/pen/abGjxKN?editors=0010)        |
|       蓁心#6229       | [codePen](https://codepen.io/tlorfrnl-the-typescripter/pen/zYjJqKo?editors=1010) |
|       Kimi#9564       |                [codePen](https://codepen.io/kimihu91/pen/wvXvNZR)                |
|       YU #0618        |                 [Codepen](https://codepen.io/yoken_/pen/yLjxOjJ)                 |
|      pidder#7315      |                [Codepen](https://codepen.io/liaoben/pen/oNdPLgQ)                 |
|       萱仔#0781       |        [Codepen](https://codepen.io/ting-hsuan/pen/eYrLzmG?editors=1010)         |
|       竹輪#3335       |              [Codepen](https://codepen.io/chikuwa0120/pen/YzLOWZo)               |
|       mou#2215        |       [Codepen](https://codepen.io/shihchiehlan/pen/MWGqyRp?editors=0010)        |
|       lee#5462        |        [Codepen](https://codepen.io/barrylee85/pen/abGaZaX?editors=0010)         |
|       RJRS#9430       |                  [Codepen](https://codepen.io/RJRS/pen/XWqPKyy)                  |
|      郭芙蘭#6374      |         [Codepen](https://codepen.io/flora_Kuo/pen/gOzdMZw?editors=0011)         |
|     RyanTsai#8906     |                [CodePen](https://codepen.io/linlaose/pen/qBYMNLz)                |
|      毛毛雨#2242      |                 [CodePen](https://codepen.io/em-lee/pen/dyeqpNX)                 |
|      Curtis#4780      |         [Codepen](https://codepen.io/curtislin/pen/ZEoMpLP?editors=1010)         |
|     kenki100#0068     |                 [Codepen](https://codepen.io/ken100/pen/yLjxaMG)                 |
|      kevin#6131       |   [Codepen](https://codepen.io/xlqjezvc-the-encoder/pen/ZEoMprd?editors=1011)    |
|    LHchien33#6232     |         [Codepen](https://codepen.io/lin_chien/pen/MWGqjdg?editors=0010)         |
|     WEI_RIO#9342      |          [Codepen](https://codepen.io/wei_wu/pen/XWqPNep?editors=0010)           |
|   Ryan Chiang#6649    |                 [Codepen](https://codepen.io/pen/?editors=0010)                  |
|       Jhen#4563       |                [Codepen](https://codepen.io/su-jhen/pen/QWrVGZj)                 |
| hayaka#4579 |[Codepen](https://codepen.io/CocoCat/pen/jOxvBNz?editors=0011)|
|      王懷英#7271      |                [Codepen](https://codepen.io/huaiying/pen/poVONyo)                |
|       juri#5114       |         [Codepen](https://codepen.io/jurry126/pen/ZEoMLjR?editors=0010)          |
|    Shalina123#3090    |               [Codepen](https://codepen.io/shalina123/pen/RwyYKYW)               |
Po Wei#8484 |[Codepen](https://codepen.io/harrison-wei-lai/pen/JjvaEBV)|
|    Mia小福#4473    |               [Codepen](https://codepen.io/a0950271/pen/ExLeWWY)               |
|    XYY#2630    |               [Codepen](https://codepen.io/Xing-Ying/pen/VwxGpbK)               |
|Mylène#2481|[Codepen](https://codepen.io/hamajibashi/pen/LYmJjjG)|
|LQQ#4187|[Codepen](https://codepen.io/morefoodq/pen/poVOWEo)|
|Karol-Kuo#5287|[Codepen](https://codepen.io/ting-yu-kuo/pen/poVOWOy)|
|xherobruce#6825|[Codepen](https://codepen.io/winwinbruce/pen/qBYMoMw)|
|大衛#4869|[Codepen](https://codepen.io/exnsrpjc/pen/eYrLrxO?editors=0011)
|yoyo!@!@##1003|[Codepen](https://codepen.io/crpbugqy-the-typescripter/pen/YzLOvGe?editors=1111)|
|Eileen#6454|[Codepen](https://codepen.io/Eileen-io/pen/GRdXBJb)|
|Murmurline#6969|[Codepen](https://codepen.io/murmurline/pen/abGajMX)|
|ZawaLeng#4307|[Codepen](https://codepen.io/len5464/pen/wvjEEYX?editors=1010)|
|Cream#3449|[Codepen](https://codepen.io/frxdwbbi-the-sasster/pen/zYjJmxr?editors=1111)|
|Azi Hsieh#2861|[CodePen](https://codepen.io/AziHsieh/pen/VwxGErX)|
|NathanJames#8120|[CodePen](https://codepen.io/ufo060204/pen/BaxOqrE?editors=0010)|
|Paul#7426|[CodePen](https://codepen.io/paul-1997/pen/XWqPyxP?editors=0010)|
|DoraHuang#8223|[CodePen](https://codepen.io/mwebwvuq-the-flexboxer/pen/RwyYqYN)|
|Ting#8449|[Codepen](https://codepen.io/liara/pen/zYjJyVv)|
|Sonia Wu#7154|[Codepen](https://codepen.io/YUJOU/pen/RwyYvLJ)|
|Evelyne #7273|[Codepen](https://codepen.io/Evelynep/pen/mdLGvNo)|
|Sentiments#4883|[codepen](https://codepen.io/Sentiments/pen/oNdPObg)
|Ringo #7583|[Codepen](https://codepen.io/ringolai1988/pen/eYrLoRX?editors=0010)|
|山貓(焜)#7041|[Codepen](https://codepen.io/nopeta/pen/LYmJvyV)|
|Chloe#5422|[Codepen](https://codepen.io/Ironchloe/pen/PoedgvR?editors=0010)|
|健育#5748|[Codepen](https://codepen.io/c1317156/pen/XWqPLdz)|
| Jenny真#7532 | [CodePen](https://codepen.io/wei-chen-wu/pen/poVOXBp?editors=0010) |
| Silvialu#4521 | [CodePen](https://codepen.io/Silvia091640/pen/MWGqNrL) |
|布萊恩#6319| [codePen](https://codepen.io/bryanlincode/pen/ZEoMgMN)|
|大大#5164| [codePen](https://codepen.io/pen/tour/welcome/start?editors=1010)|
|jonathanlin83#5063|[Codepen](https://codepen.io/jonathanlin83/pen/oNdagYg)|
|H.L.C#2152|[Codepen](https://codepen.io/hsin-liang/pen/QWrZKOr)|
|Nini Chen#5790|[Codepen](https://codepen.io/ninistyle/pen/YzLJpea?editors=0010)|
| yaru#6308|[CodePen](https://codepen.io/lszaietc/pen/zYjJwGB)|
| Loran#1105|[CodePen](https://codepen.io/loranlin/pen/RwyYRyP?editors=1111)|
|IreneY#0086|[codepen](https://codepen.io/HalfPlannedJourney/pen/eYrPezW)|
|黑松胖#4836|[Codepen](https://codepen.io/yi-chien-hsieh/pen/OJZBzBO)
|Shuo#1596|[Codepen](https://codepen.io/chiangchungshuo/pen/qBYLqya)
|Novella#1032|[Codepen](https://codepen.io/Novellaq/pen/bGMOYMX?editors=1010)
|RosaC#4286|[Codepen](https://codepen.io/RosarC/pen/XWqozwe?editors=1111)
|維尼#2200|[Codepen](https://codepen.io/gxvzprtq-the-selector/pen/RwyExMN?editors=0012)
|pss940909#8650|[Codepen](https://codepen.io/pss940909/pen/JjvwMoZ)
|mei#8421|[Codepen](https://codepen.io/Shila-Chen/pen/QWrYbEQ?editors=1111)
|ViNci#4273|[Codepen](https://codepen.io/ViNciSyo/pen/gOzqpZX)
|Aritan#1931|[Codepen](https://codepen.io/Aritan/pen/zYjeNNq?editors=1111)
|Karen Chan#4625|[Codepen](https://codepen.io/ruruchan7/pen/PoeXZQz)
| 阿修#1976 | [Codepen](https://codepen.io/xiu-tong/pen/NWMomER)|
|三隻小貓#1905|[Codepen](https://codepen.io/bagelover/pen/VwxRWRy?editors=0010)|
| kancheng#3915 |[CodePen](https://codepen.io/kancheng/pen/wvjOxyE?editors=0010)|
| christina#6185 |[codepen](https://codepen.io/chrisc0210/pen/wvjZJWO)|
|hua#9099|[Codepen](https://codepen.io/LHua/pen/NWMmXrm)|
|MJ_Eddie#5258|[CodePen](https://codepen.io/nick-lin/pen/dyeLLmm)
|popcorn_3q#9893|[CodePen](https://codepen.io/arnyrpqt-the-sasster/pen/poVBXgK?editors=0010)
|L0F0#8733|[CodePen](https://codepen.io/l0f0/pen/eYramwv?editors=0011)
|安o#2448|[CodePen](https://codepen.io/JzhenAn/pen/wvjbzNL?editors=1111)
|Tuhacrt#0008|[codepen](https://codepen.io/Tuhacrt/pen/vYjobMQ)|
|阿蘇#8531|[codepen](https://codepen.io/susu3131/pen/eYrPbKx)|
|勁辣雞腿寶#5817|[Codepen](https://codepen.io/orz311013/pen/ExRxZgv?editors=1011)|
|How#5806|[Codepen](https://codepen.io/howtobefine/pen/oNyNeEN)|
|Dingy#2931|[Codepen](https://codepen.io/dingy-xiao/pen/BaxvaXN)|
|周周#3503|[Codepen](https://codepen.io/jhoujhou-the-decoder/pen/wvXzwWZ?editors=1011)|
|meimei#9524|[Codepen](https://codepen.io/isnrudav/pen/KKRBjxQ)|