---
# System prepended metadata

title: "\U0001F3C5 DAY18 每日任務：函式觀念二"
tags: [JS 直播班  - 2021 秋季班]

---

# 🏅 DAY18 每日任務：函式觀念二
###### tags: `JS 直播班  - 2021 秋季班`

函式觀念二
---
建議同學都將以下程式碼貼入 CodePen 執行、觀察結果。

### 函式裡面仍可以執行函式 ([參考章節](https://courses.hexschool.com/courses/20201113/lectures/34094708))

```js=
function morningAction() {
    // 函式內部也可以呼叫其他函式，好處是可以重複利用程式碼、簡潔版面。
    cleanHead();
    console.log("出門");
} 
function cleanHead() {
    console.log("刷牙");
    console.log("洗臉");
} 
morningAction();
```



問題
---
請親自撰寫一次以上觀念的程式碼，並可以用註解強化知識點。


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

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

|     Slack      |                          CodePen                           |
|:--------------:|:----------------------------------------------------------:|
|  Karen Huang   | https://codepen.io/Coding_Snorlax/pen/bGrabeq?editors=0010 |
|   Iris Huang   |           https://codepen.io/ythuang/pen/zYdpOzy           |
|    Aaron Tu    |           https://codepen.io/aarontu/pen/gOxoYxw           |
|    CloThEs     |      https://codepen.io/bogwdnxx-the-sans/pen/jOLYNya      |
|     YuriT      |          https://codepen.io/wenfisht/pen/QWMOdwz           |
|     POPEYE     |          https://codepen.io/popeye_ux/pen/porpzpV          |
|     傅劍軒     |  https://codepen.io/seonkuraito/pen/mdMpbBE?editors=0010   |
|      米米      |  https://codepen.io/Jameshsu0407/pen/gOxoYZW?editors=0011  |
|      Sam       |           https://codepen.io/sam-hsu/pen/gOxoYqR           |
| 有廖先生(Rain) |         https://codepen.io/billpop741/pen/YzxYKJW          |
|   Kelvin Hsu   |   https://codepen.io/kelvin001/pen/eYEyOXX?editors=0011    |
|     Genos      |          https://codepen.io/pb220416/pen/abyEbzz           |
|     林小君     |      https://codepen.io/hcvbcjqq-the-vuer/pen/gOxoObG      |
|  Jun Ting Lin  |          https://codepen.io/jake1155/pen/ExvoxVa           |
|    Tim Lin     |          https://codepen.io/TimmyLin/pen/wvqpwxr           |
|     Arista     |        https://codepen.io/arista-hsieh/pen/JjyMjRX         |
|       YC       |            https://codepen.io/YCLu/pen/xxLpxEZ             |
|     jojoy      |     https://codepen.io/jojoy/pen/qBXpBjq?editors=0010      |
| Elaine Liu | https://codepen.io/elaine7598/pen/jOLYOLJ?editors=0010 |
| Andy Huang | https://codepen.io/HsuHuaHuang/pen/ExvoxoK
| 劉維倫 | https://codepen.io/lun0223/pen/bGraGWm?editors=1011 |
|Cheng Pei-hsuan|https://codepen.io/PaCheng/pen/zYdGKpO|
|lumei|https://codepen.io/l_umei/pen/zYdpYdv |
|鄭安志|https://codepen.io/lwmtsgek/pen/XWaVWzm?editors=0011|
| Yof |https://codepen.io/yangyof/pen/NWvXWBJ?editors=1011 |
| Peter Chen | https://codepen.io/yuckugjy-the-sasster/pen/KKvZKBO?editors=1112 
|大衛|https://codepen.io/exnsrpjc/pen/XWaVWPd?editors=0010|
|群嘉|https://codepen.io/pen/?editors=1011|
|ZY Hsu|https://codepen.io/zihyin/pen/JjyMjeN?editors=1011|
|洋蔥|https://codepen.io/oikdkmxq-the-looper/pen/xxLpxed?editors=0011|
|Gill|https://codepen.io/Gill-Chin/pen/xxLPqRW?editors=0011|
| Yunei | https://codepen.io/Yunei/pen/dyzJPoe |
| 連小艾 | https://codepen.io/bolaslien/pen/VwzyYZx?editors=0012 |
|Gui|https://codepen.io/guitimliu/pen/eYEyYqz |
| ShinyChen | https://codepen.io/shinychen/pen/ExvoxzW |
| Pei Ying | https://codepen.io/Pei-Ying/pen/NWvXPbW?editors=0011 |
| Jie Du | https://codepen.io/qgqonost-the-flexboxer/pen/WNEdbve?editors=0011 |
| Bean Huang | https://codepen.io/Beanhuang/pen/ExvoaLQ?editors=0011 |
|  ZOE WU   | https://codepen.io/Zoechiueh/pen/porpvLR?editors=0011 |
|Hamaji| https://codepen.io/hamajibashi/pen/gOxopOa |
|kk|https://codepen.io/potatokaka/pen/bGradpg|
|Yashin Lin|https://codepen.io/YashienLin/pen/NWvXqvv?editors=0011|
| Riley | https://codepen.io/jjpxbprd/pen/LYjeVrY |
| Lai | https://codepen.io/co_lai/pen/yLopYod?editors=0011 |
| 蔣秉彣 | https://codepen.io/the-pierre/pen/bGrojWJ?editors=0010 |
| 陳暐中 | https://codepen.io/wei-z/pen/xxLpRKy?editors=0012 |
|Jasper|https://codepen.io/li-jasper/pen/yLopVpj
|Alvin|https://codepen.io/Alvin20201116/pen/yLopgwy?editors=0011|
|phi|https://codepen.io/aiya861202/pen/eYEmVjR?editors=1112|
|鉦勝|https://codepen.io/atckmax823/pen/QWMapGw?editors=1011|
|Steven Chan |https://codepen.io/Steven1220/pen/mdMpmJd?editors=1011 |
| 黃士桓 | https://codepen.io/shr-huan-huang/pen/WNEdjvR?editors=0011 |
|Jeff|https://codepen.io/jeff-cheng/pen/QWMavvM|
|  肉魚  |  https://codepen.io/zoechen13/pen/PoKEmXm  |
|Hsiang|https://codepen.io/chao20211/pen/LYjeLpN?editors=1010|
|Jun Hua | https://codepen.io/ydsyvkph/pen/KKvZqgb |    
|Yunyi|https://codepen.io/yunyi12374/pen/ZEJbKVW?editors=1111|
|Louis|https://codepen.io/Louis164156/pen/porpWow?editors=1010|
|許閔翔|https://codepen.io/oupbzfxq-the-scripter/pen/WNEdZOO|
|喜美|https://codepen.io/Candace802/pen/mdMpBqV?editors=0|
|Booker|https://codepen.io/bookbasketball/pen/Vwzyrxz|
|Bonnie|https://codepen.io/bonnieli1414/pen/KKvZQwm?editors=1111|
|  YOYO   | https://codepen.io/lumedkle/pen/JjyMwqB?editors=1011 |
|Phil |https://codepen.io/ctkeftjp-the-animator/pen/JjyMGea?editors=0012 |
|danny123| https://codepen.io/binlandz123/pen/rNzpbLM?editors=0010 |
|Trista| https://codepen.io/trista6140/pen/LYjQpyN |
|Jocelyn|https://codepen.io/enjoyful/pen/rNzJORV?editors=0011|
|雪莉|https://codepen.io/utshang216/pen/oNeEjOW|
|乃萱|https://codepen.io/nainaikuo/pen/bGrLEzN?editors=0011|
|Anna|https://codepen.io/kycrleao/pen/rNzJypj?editors=1011|
|LTL|https://codepen.io/ltlin93/pen/bGrLobd?editors=0010|
|lingxuan|https://codepen.io/penglingxuan/pen/GRvQwYM?editors=0010|
| Celeste | https://codepen.io/Celeste17/pen/YzxedyE?editors=0011 |
|Vicky Kao|https://codepen.io/vicky03035/pen/oNeEVdL|
|Sandy|https://codepen.io/Sandy_L/pen/ExvQzYb?editors=0011|
| 三隻小貓 | https://codepen.io/bagelover/pen/ExvQqvN?editors=0012 |
|YU-LING TUNG|https://codepen.io/igzdflpu/pen/JjyLBRq?editors=0011|
|AKI|https://codepen.io/akichen27/pen/RwZMvrq|
|kevinhes|https://codepen.io/kevinhes/pen/MWvGyzo?editors=0012|
|Irene Wang|https://codepen.io/irene-wang-the-looper/pen/abyGeNo|
|Mingyo|https://codepen.io/Nick-Yo/pen/rNzKWNx?editors=0011 |
|柯勝華| https://codepen.io/Chill-Nick/pen/OJjErqZ?editors=0010|
|Zooey Cheng| https://codepen.io/noraneko0430/pen/VwzBvgo?editors=0012
|zaii|https://codepen.io/ivy2846357/pen/XWaxbmw?editors=0010|
|kailun|https://codepen.io/Kailun/pen/xxLyYEK|
|吐司|https://codepen.io/malolulu/pen/OJjdKyw|
|Ching|https://codepen.io/Jaimedede/pen/KKvEGBW?editors=1010|
|Jean Chiang|https://codepen.io/jeanchiang1221/pen/GRvLxZJ|
|傑瑞|https://codepen.io/auatwood909815/pen/NWvVpaz?editors=0010|
paul|https://codepen.io/printfootya/pen/rNzgygV?editors=1010|
