---
# System prepended metadata

title: "\U0001F3C5 Day 05 - 賦值運算子與傳參考概念"
tags: [JS 直播班 - 2024 秋季班]

---


# 🏅 Day 05 - 賦值運算子與傳參考概念

### 題目

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

問題一
---
了解賦值運算子，並計算出最後 console.log 印出的結果
```javascript=
let a = 1;
let b = 2;
a += 30;
a--;
b - 1;
a -= b;

console.log(a);
console.log(b);
```

問題二
---
請回答以下程式碼最後的 console.log 結果
```javascript=
let groupA = {
  people: 10,
  age: 20
};

let groupB = groupA;
groupB.people = 3;

console.log(groupA);
```

## 回報流程

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

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

<!-- 解答：

問題一：
a: 28
b: 2
（陷阱：b - 1 那行並未賦值，
所以其值並不會帶入 b）

問題二：
{
  people: 3,
  age: 20
}

-->




回報區
---
| #   | Discord | CodePen / 答案 |
| --- | ----- | ----- |
| 01  | Jainee| [CodePen](https://codepen.io/Jainee0110/pen/dyxGyBJ) | 
| 02  | 泊岸| [CodePen](https://codepen.io/qoq77416416/pen/RwXrmbm?editors=0011) |
|03|朋仔|[CodePen](https://codepen.io/YPHUANG/pen/yLmOOxv?editors=0011)|
|  04   |   雪粒    | [CodePen](https://codepen.io/bzykdfhw-the-bashful/pen/WNVwZGx) | 
| 05| voke| [CodePen](https://codepen.io/FiSi-the-lessful/pen/OJKMdxX)|
|06|陳睿睿|[CodePen](https://codepen.io/uwmrsusb-the-solid/pen/QWeNmOB?editors=1111)|
| 07 | 毛巾 |[CodePen](https://codepen.io/bqdcjboa-the-solid/pen/GRVZxxv)|
| 08 | a1phaki(小k) | [CodePen](https://codepen.io/a1phaki/pen/RwXaMYg) | 
|09|chris| [CodePen](https://codepen.io/chris-chen-the-selector/pen/QWeNmVZ?editors=0010) | 
|10|Hailey|[Codepen](https://codepen.io/sxbokfja-the-flexboxer/pen/xxvVWMZ)|
| 11 | Tatsu | [CodePen](https://codepen.io/chindesu0207/pen/oNKxqJY) | 
| 12 | tim | [CodePen](https://codepen.io/jskrtivy-the-animator/pen/OJKNvGZ?editors=0011) |
| 13 | Hedwig | [CodePen](https://codepen.io/adirehfz-the-encoder/pen/ExqKLYP?editors=0011) | 
| 14 | ABOOS | [CodePen](https://codepen.io/guhungyin/pen/PoMNRMe?editors=0012) | 
| 15 | mercury2508. | [CodePen](https://codepen.io/Mercury2508/pen/ExqKLxK) |
| 16 | Dolce_墨 | [CodePen](https://codepen.io/DolceTseng1026/pen/yLmOKdd) |
| 17 | Lotte | [CodePen](https://codepen.io/hmkdoxuj-the-decoder/pen/mdNPxKw?editors=0011) |
| 18 | 湘湘 | [CodePen](https://codepen.io/siangsiang/pen/WNVwJGW)|
| 19 | Satar | [CodePen](https://codepen.io/SatarKuo/pen/gOVrzGB?editors=0011)|
| 20 | JRz | [CodePen](https://codepen.io/JRZHENG/pen/rNXevYM?editors=0111)|
| 21 | zobody | [CodePen](https://codepen.io/Zoe-Shih/pen/ExqKLEm)|
|  22   |  Ariel   | [CodePen](https://codepen.io/ariel0510/pen/mdNPLxz?editors=0011) |
|  23   |  KOMATSU PEI   | [CodePen](https://codepen.io/Komatsu2021/pen/QWeNrpX?editors=0010) |
|  24     |  brucelee0629  | [CodePen](https://codepen.io/xxhdklwi-the-decoder/pen/XWvdqxM?editors=0011) | 
|  25     |  Mars  | [CodePen](https://codepen.io/MarsKuo/pen/dyxMKJL) | 
|  26   | xcx100      | [CodePen](https://codepen.io/c13026/pen/vYoGraB?editors=0012) | 
|  27   | ab567ab5 | [CodePen](https://codepen.io/WanTzu-Chiang/pen/jOgqKJG?editors=0011) | 
|  28   | 瑞斯Darius_TszYing | [CodePen](https://codepen.io/bekgnohe-the-selector/pen/ExqKRpd?editors=0011) | 
|  29  | jerry_66983      | [CodePen](https://codepen.io/Barry-C/pen/dyxMjdX?editors=1111) |
| 30 | Kaya | [CodePen](https://codepen.io/kayaribi/pen/PoMNdzB) | 
|  31   | CrystalLala     | [CodePen](https://codepen.io/crystallala/pen/wvVGEeN) |
|  32   | kaka_945     | [CodePen](https://codepen.io/kay945/pen/eYqZLLB) |
|  33   | ABow_Chen     | [CodePen](https://codepen.io/fred39392001/pen/JjgXvMy) |
|  34   |    610   | [CodePen](https://codepen.io/YI-LING-LIU/pen/oNKxPVd) |
|  35   |    Ellie   | [CodePen](https://codepen.io/Ellie-Chiang/pen/XWvdJwe) |
|  36   |    嚼勁先生   | [CodePen](https://codepen.io/James520284/pen/ExqKdop) |
|  37   |    jimmy.0706   | [CodePen](https://codepen.io/JimmyMao/pen/vYoGQLL?editors=0010) |
|  38   |    野鴿   | [CodePen](https://codepen.io/HoshinoSyouta/pen/GRVZwYM?editors=0011) |
|  39   | Ruby | [CodePen](https://codepen.io/xivgaijl-the-selector/pen/WNVwLae) |
|  40  |   yuyeh_1212   | [CodePen](https://codepen.io/yuyeh1212/pen/PoMNXLg) |
| 41 | Mos | [CodePen](https://codepen.io/mos25399/pen/KKOzbRw?editors=1111) |
|  42   |   Celine    | [CodePen](https://codepen.io/szuning/pen/jOgqdvw) |
|  43   | anderson666 | [CodePen](https://codepen.io/goodmanbuild/pen/zYgqbEV) |
| 44 | 黛西 | [CodePen](https://codepen.io/ChiashengLin/pen/vYoGMGW?editors=0010) |
| 45 | yuling | [CodePen](https://codepen.io/yu-ling-peng/pen/xxvVBqv?editors=0011) |
| 46 | JIA| [CodePen](https://codepen.io/nzaicwlw-the-styleful/pen/OJKNGVE?editors=0010) |
| 47 | 邵 |[Codepen](https://codepen.io/ukscrlno-the-typescripter/pen/jOgqRJP?editors=0011)|
| 48 | Ed Huang |[Codepen](https://codepen.io/yide1986/pen/KKOzOoK)|
| 49 | joylu0902 |[Codepen](https://codepen.io/joylu0902/pen/zYgqgdK)|
| 50 | Toung | [CodePen](https://codepen.io/Toung/pen/XWvdGXo)|
| 51 | leoli35 | [CodePen](https://codepen.io/Jainee0110/pen/dyxGyBJ?editors=0010)|
| 52 | GTR150 | [CodePen](https://codepen.io/Wer-Qwe/pen/abeZdZZ?editors=1111)|
| 53 | charlottelee | [CodePen](https://codepen.io/char849/pen/yLmJOMM)|
| 54 | ycl325.etheddie | [CodePen](https://codepen.io/wdvikfuz-the-selector/pen/mdNEPWY)|
| 55 | yu | [CodePen](https://codepen.io/yu_ch12/pen/ExqyNYv)|
| 56 | david1819 | [CodePen](https://codepen.io/David-Lin-the-vuer/pen/xxvOgYK)|
| 57 | Emma | [CodePen](https://codepen.io/Emma0919/pen/yLmJXGG)|
| 58 | Seris | [CodePen](https://codepen.io/Dale-Chien/pen/NWQraob)|
| 59 | Sonia | [CodePen](https://codepen.io/YUJOU/pen/abeZLrR?editors=0011)|
| 60 | 孫夜空 | [CodePen](https://codepen.io/sunnight0802/pen/ExqyQeR?editors=1111)
| 61 | 是在哈囉 | [CodePen](https://codepen.io/miyxdhem-the-solid/pen/oNKLqxK?editors=1111)
| 62 | 倫倫 | [CodePen](https://codepen.io/f5badapple/pen/NWQrzPK?editors=0010)|
| 63 | Lianne | [CodePen](https://codepen.io/Elaina-L/pen/mdNEKJa)|
| 64 | Shiloh | [CodePen](https://codepen.io/vhswacvv-the-sasster/pen/vYoXYzK?editors=1111)|
| 65 | GAVI | [CodePen](https://codepen.io/qbafldcv-the-scripter/pen/MWNjWLz?editors=0010)|
| 66 | Mike | [CodePen](https://codepen.io/mike2049/pen/XWvjpLw?editors=0010)|
| 67 | Martin| [Codepen](https://codepen.io/wyipzpnh-the-decoder/pen/gOVwqrB)|
|68|蘑菇星星|[CodePen](https://codepen.io/brrrieon-the-vuer/pen/abemXaE?editors=0012)
| 69   | jing6408 | [CodePen](https://codepen.io/qqjuyjat-the-builder/pen/qBeaGyo) |
| 70 | KUN. | [CodePen](https://codepen.io/barry91205/pen/KKONPYg?editors=1111) |
|71|陳小廷|[CodePen](https://codepen.io/ting1124/pen/KKOgOQJ)|
|72|haojing|[CodePen](https://codepen.io/hjxu/pen/XWvNKjE)|
|73|alec1203|[CodePen](https://codepen.io/soloayaya/pen/abeBQqa?editors=1112)|
|74|Joannehu|[CodePen](https://codepen.io/nelbabkv-the-flexboxer/pen/QWedqew)|
|75|Kasie|[CodePen](https://codepen.io/KasieL/pen/oNKBEmp?editors=0011)|
|76|黛Dye|[CodePen](https://codepen.io/Dye_Note/pen/QWedzjg)|
|77|Glen_69515|[Codepen](https://codepen.io/glenyaochih/pen/VwopwME)
|77|yoishere|[Codepen](https://codepen.io/yoishere/pen/WNVpzPw)
|78|xiang5141|[Codepen](https://codepen.io/XIANG-XIANG/pen/vYomKea?editors=0010)
|79|Avis|[CodePen](https://codepen.io/avisstian/pen/poMPOdw?editors=1111)
|80|Jim|[CodePen](https://codepen.io/JimChou/pen/rNXzaJz?editors=0011)
|81|Ollie|[Codepen](https://codepen.io/daiyy97/pen/OJKxZQq?editors=0010)|
| 82 | Ana | [CodePen](https://codepen.io/Ana-Wu/pen/NWQaMJP?editors=0011) |
| 83 | yaoling.liang | [CodePen](https://codepen.io/Yao-Ling-L-/pen/yLmzxaL?editors=1111) |
| 84 | Kim | [CodePen](https://codepen.io/kim0101__/pen/yLmPOMM?editors=0112) |
| 85 | 維妮 | [CodePen](https://codepen.io/Maggy-Lin/pen/MWNOjOY?editors=0011)|
| 86 | iamcan | [CodePen](https://codepen.io/uhnxswdq-the-typescripter/pen/ExqRxKZ)|
| 87 | zen | [CodePen](https://codepen.io/zen742937/pen/wvVxBEz?editors=1111)|
| 88 | 地瓜 | [CodePen](https://codepen.io/huangtzuchin/pen/wvVxdeq)|
| 89 | Amy(咂摳) | [CodePen](https://codepen.io/nnxucgmc-the-builder/pen/dyxqRbM?editors=0011)|
| 90 | Nocab Wang ( 培根 ) | [CodePen](https://codepen.io/PeihanWang/pen/MWNzWKB?editors=0011)|
| 91 | Vivian | [CodePen](https://codepen.io/vivian-hsiao/pen/YzmmxWj)|
|92|ji3di|[Codepen](https://codepen.io/jwuuhtxh-the-builder/pen/EaYjWwx?editors=0011)
|93|Chuang|[Codepen](https://codepen.io/uidoytjq-the-solid/pen/NPKvbRL?editors=0010)
|94|Anna|[Codepen](https://codepen.io/Anna-Teng/pen/ogvGXRe?editors=0010)|

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