---
# System prepended metadata

title: "\U0001F3C5 5/17(二) 每日 JS 刷題任務 - 陣列+物件"
tags: [公益程式體驗營 - 2022]

---

---
tags: 公益程式體驗營 - 2022
---

# 🏅 5/17(二) 每日 JS 刷題任務 - 陣列+物件


### 題目一：依照文字描述物件

請宣告一個 `family` 的變數，賦予物件型別，並嘗試在裡頭加上以下資訊

* 母親叫做`Mary`
* 父親叫做 `Bob`
* 有三個孩子，分別叫做 `John`、`Tom`、`Kate`
* 養了五隻貓、七隻狗、八頭牛、九隻蜘蛛
* 房貸是否繳清：否


### 題目二：看圖設計物件
* 請宣告一個 `room` 的變數，賦予物件型別，盡量描述下方圖片內容，例：有多少人開會，男女比例、文具數量等等。
![](https://i.imgur.com/EFx4fsv.jpg)

### 題目三：擴充物件內容
* 請透過 `addKeyValue` 函式，來增減 `obj` 物件內容。
``` =JavaScript
const obj = {
    name:"",
    people:3
};
// input 輸入
addKeyValue("name","Mike")
addKeyValue("people",2)
addKeyValue("people",4)

// output 輸出
//1
{
    name:"Mike",
    people:3
}
//2
{
    name:"Mike",
    people:5
}
//3
{
    name:"Mike",
    people:9
}
```

### 題目四：進階題，不適合新手
請宣告一個 `obj` 函式，並用`obj()[2]()`方式執行，並會 return 回傳 "hi"

```
obj()[2]()

// output 輸出
"hi"
```

## 回報流程

1. 將答案貼在 Codepen 並複製 Codepen 連結貼至「回報區」回報
（也可以將答案直接貼至「回報區」）

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

<!-- 解答：  -->


回報區
---

<!-- 0. Bingbingboom（回報範例，請使用註解回報）
答案：（可直接撰寫答案）
Codepen：https://codepen.io/Bingbingboom/pen/jOBZVWq
-->

<!-- 1. Bruno Yu
答案：（可直接撰寫答案）
Codepen：https://codepen.io/bruno-yu/pen/jOZMqpE?editors=0011
-->

<!-- 2. ART

-->

<!-- 3. 小鹿Kerwin#5730
https://codepen.io/tkoleo84119/pen/poaRYmE?editors=0012
-->

<!-- 4.IreneLee
codepen:https://codepen.io/ntjtcxpt-the-animator/pen/poaRBrw?editors=1111
-->

<!-- 5.Xiang#5313
codepen:https://codepen.io/snorlaxxu/pen/yLvgrpz?editors=0010
-->

<!-- 6.yunyun
codepen:https://codepen.io/yun_yunni/pen/MWQJROO
-->

<!-- 7. su#7798
codepen: https://codepen.io/wc-su/pen/qBxRwVL
-->


<!-- 8. CloThEs
Codepen：https://codepen.io/bogwdnxx-the-sans/pen/eYVgoBe
-->

<!-- 9. Jason Chen
Codepen：https://codepen.io/jason60810/pen/NWydmzp
-->

<!-- 10. Noy 
https://codepen.io/MochiCodingPen/pen/WNMRBaa
-->

<!-- 11. 楓之聲#6945
https://codepen.io/sshane258/pen/dydNErv
-->

<!-- 12. Tuhacrt#0008
Codepen: https://codepen.io/Tuhacrt/pen/mdXRYBm?editors=0011
-->

<!-- 13. Aaron
Codepen : https://codepen.io/narrowd4c/pen/GRQJoJP
-->

<!-- 14. Stanley#3825
Codepen : https://codepen.io/sean_1215/pen/QWQdXey?editors=0111
-->

<!-- 15. hw#0715
https://codepen.io/Lhwei/pen/XWZpQOx 
-->

<!-- 16. Peng
https://codepen.io/peng-027/pen/ZErLgxr
 -->

<!-- 17. yuyu#6310
https://codepen.io/yuyu0905/pen/ZErezaP?editors=0012
 -->
 
 <!-- 18. KuoMin#4931
https://codepen.io/KuoMin/pen/jOZyggY
 -->
 
<!-- 19. bakiii#2652
  https://codepen.io/aki168/pen/mdXWyEZ-->
  
<!-- 20. Lnn#0492
 https://codepen.io/Knn_84/pen/qBxrEMv?editors=0110
-->
 
<!-- 21. Chaco#2993
  https://codepen.io/chaco-wang/pen/NWypqKv?editors=1011 
-->

<!-- 22. RayChen#6088
   https://codepen.io/raychen1996/pen/RwQpWLJ
-->

<!-- 23. JustinLiu
Codepen: https://codepen.io/justin0227/pen/BaYWjLy?editors=0011
-->

<!-- 24. lyle#8123
Codepen: https://codepen.io/tomys/pen/bGLqVJb?editors=0011
-->

<!-- 25. shujhen#7734
Codepen：https://codepen.io/shujhen/pen/ExQWVjK
-->

<!-- 26. Katie
Codepen：https://codepen.io/Katie24/pen/MWQJMdJ
-->


<!-- 27. Josh Chen#4552
Codepen：https://codepen.io/hiphop825/pen/yLvMOXR?editors=0010
-->

<!-- 28. bonnieli1414#4906
Codepen：https://codepen.io/bonnieli1414/pen/YzeZWqE?editors=0011
-->

<!-- 29. Arista
Codepen：https://codepen.io/arista-hsieh/pen/MWQpeQK
-->

<!-- 30. hsiuhsiu
Codepen：https://codepen.io/hsiuhsiu/pen/poaeEwP?editors=0011
-->

<!-- 31. Chi
Codepen:　https://codepen.io/YoChi84/pen/abqJBVo 
-->

<!-- 32. Lina Chen
Codepen: https://codepen.io/LinaChen/pen/abqJmjR
-->

<!-- 33. Easton#3863
Codepen: https://codepen.io/EastonIsCodingNow/pen/QWQpdbY?editors=1111
-->


<!-- 33. andersonshen#4675
Codepen: https://codepen.io/luxyenni-the-bold/pen/MWQpvjm
-->

<!-- 34. han#9437
Codepen: https://codepen.io/qnrxylcw-the-reactor/pen/PoQpyoz
-->

<!-- 35. 安安你好你是誰#7416
Codepen: https://codepen.io/leave3310-the-looper/pen/dydvgBO
-->

<!-- 36. TaoDoris#5230
Codepen: https://codepen.io/peetaoting/pen/MWQpMRK
-->

<!-- 37. Chaoci#2460
Codepen: https://codepen.io/gmailchao/pen/xxYdKvG?editors=0010
-->

<!-- 38. Jia-Hong Chen#3863
Codepen: https://codepen.io/iloveleon19/pen/RwQppRO?editors=0010
-->

<!-- 39. Vera#5592
Codepen: https://codepen.io/skvera/pen/dydWoKY
-->

<!-- 40. Mojito#6002
 codepen: https://codepen.io/vu3xk41997/pen/JjpNGVe
-->

<!--  41.Pearlie#3536
 codepen: https://codepen.io/PPcode/pen/BaYRmmP
-->

<!--  42. Cheng-Yu#1813
 codepen: https://codepen.io/ball77111/pen/abqWqjr?editors=0011
-->

<!--  43. 亞芽#1185
 codepen: https://codepen.io/sanahsu/pen/RwQVyVE?editors=0011
-->

<!-- 44. Wang
Codepen:
https://codepen.io/stevetanus/pen/ExQmdGz
-->

<!-- 45. Murmurline#6969
Codepen:
https://codepen.io/murmurline/pen/zYRwmbQ
-->

<!-- 46. ChaoChao
https://codepen.io/EmiiilyJ/pen/vYdmMRv
-->

<!-- 47. Raymond Lam#0344
https://codepen.io/manshun-lam/pen/PoQpGeP?editors=1111
-->

<!--48.Vito#7797
https://codepen.io/Vito_Yang/pen/GRQEjyz?editors=1012
-->

<!--49. SASIMI#5099
Codepen:
https://codepen.io/sashimi1327/pen/JjpyYOo
-->

<!--49. Charlotte Lee
Codepen:
https://codepen.io/charlotte-lee/pen/VwQzaLV?editors=0012
-->

<!-- 50. Mitour#0672
 codepen: https://codepen.io/mitour/pen/Yzexpeo-->
 
 
 <!--51. Greta #0837
codepen: https://codepen.io/gretali/pen/vYdegwg
-->

<!--51. Sussu#4211
codepen: https://codepen.io/yatiti84/pen/yLvPRQa?editors=1111
-->

<!-- 53. 小金#3256
codepen: https://codepen.io/AmoGH357/pen/GRQXVJO
-->

<!-- 54. Yanyan#3555
codepen:     
-->

<!-- 55. Ayre#0016
codepen:https://codepen.io/yichunlin09/pen/qBoXLdY?editors=0011
-->

<!-- 56. Claire#2116
codepen：https://codepen.io/claire-chang-the-bashful/pen/jOzGKYZ -->


<!-- 58: huch09#1426
codepen: https://codepen.io/subarashii-huch09/pen/mdxqZQq?editors=1112 -->


<!--59. xuan#0808
  codepen:https://codepen.io/xuan0915/pen/gOevZqd?editors=0011-->
  
<!-- 60. Neuf#3083
 codepen: https://codepen.io/yifanneuf/pen/bGvXdxx?editors=0010-->