---
# System prepended metadata

title: "\U0001F3C5 5/3(二) 每日 JS 刷題、任務 - 字串、數字相加"
tags: [公益程式體驗營 - 2022]

---

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

# 🏅 5/3(二) 每日 JS 刷題、任務 - 字串、數字相加


## 請觀看以下兩部影片再來開始答題
### 第一部：每日任務提交講解(點擊下圖就自動播放)
{%youtube kaAvorIKxII %}

### 第二部：JS 刷題與提交流程
{%youtube iomfbjdajX4 %}


### 題目一：hello world！

``` =JavaScript
// input 輸入
hello()
hello()

// output 輸出
"Hello world！"
"Hello world！"
```
:::spoiler 點擊箭頭，展開範例解答
``` =JavaScript
function hello(){
    return "Hello world！"
}
```

fouction sayHi(name:string){
    console.log(name+'，Hello world！')
}
sayHi("Tom")
sayHi("John")
:::
### 題目二：參數+字串練習

``` =JavaScript
// input 輸入
sayHi("Tom")
sayHi("John")

// output 輸出
"Tom，Hello world！"
"John，Hello world！"
```

### 題目三：參數加法產生器
``` =JavaScript
// input 輸入
add(2)
add(4)
add(8)

// output 輸出
4
8
16
```

### 題目四：兩個參數相加器
``` =JavaScript
// input 輸入
addTwo(5,10)
addTwo(4,20)
addTwo(9,100)

// output 輸出
15
24
109
```

### 題目五：參數+字串相加
``` =JavaScript
// input 輸入
addNumberAndString(5,10,30)
addNumberAndString(4,20,22)
addNumberAndString(9,100,44)

// output 輸出
"第一加第二個參數加總為 15，第三個參數為 30"
"第一加第二個參數加總為 24，第三個參數為 22"
"第一加第二個參數加總為 109，第三個參數為 44"
```

## 回報流程

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

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

<!-- 解答：  -->


回報區
---

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


<!-- 1. 洧杰
答案：（可直接撰寫答案）
Codepen：https://codepen.io/hexschool/pen/wvyvQqZ?editors=0011
-->

<!-- 2. Wendy
答案：
Codepen：https://codepen.io/wendy03/pen/YzezdgP
-->

<!-- 3. KuoMin
答案：
Codepen：https://codepen.io/KuoMin/pen/MWQWxVy
-->

<!--  4. Martin
答案：
Codepen：
https://codepen.io/chihsuanbjjh/pen/eYVYwbg?editors=0010

-->
<!--  5. Bruno Yu
答案：
Codepen：
https://codepen.io/bruno-yu/pen/gOvYmgr

-->

<!--  6. Eric.S
答案：
Codepen：
https://codepen.io/Eric_Shen/pen/abqzwVp

-->

<!--  7. Rex_Chu
答案：
Codepen：
https://codepen.io/rex_chu/pen/dydPWrO

-->

<!--  8. @rejennylo
答案：
Codepen：
https://codepen.io/reJennylo/pen/KKQwqYd

-->

<!--  9. danny123
答案：
Codepen：
https://codepen.io/binlandz123/pen/LYQELge?editors=0010

-->
<!-- 10. CloThEs
答案：（可直接撰寫答案）
Codepen：https://codepen.io/bogwdnxx-the-sans/pen/MWQYvjp
> 
-->

<!-- 11. shijia
答案：（可直接撰寫答案）
Codepen：https://codepen.io/shijia22/pen/MWQYvmo?editors=0011
-->

<!-- 12. Art
答案：（可直接撰寫答案）
Codepen：https://codepen.io/ss97202tw/pen/XWZJaRV?editors=0010
-->

<!-- 13. Jim#8764
答案：（可直接撰寫答案）
Codepen：https://codepen.io/jim255060/pen/ExQavQR
-->

<!-- 14. yunyun#5215
答案：（可直接撰寫答案）
Codepen：https://codepen.io/yun_yunni/pen/XWZJaqE
-->


<!-- 15. Lemon
答案：（可直接撰寫答案）
Codepen： https://codepen.io/shumhoyin/pen/qBxEXGw
-->

<!-- 16. Leo Song
答案：（可直接撰寫答案）
Codepen：
https://codepen.io/sunnylaba/pen/qBxEXyL?editors=0011
-->

<!-- 17. Cheng-Yu
答案：（可直接撰寫答案）
Codepen：
https://codepen.io/ball77111/pen/GRQgvVo?editors=1011
-->
<!-- 18. Knn
答案：（可直接撰寫答案）
Codepen：
https://codepen.io/Knn_84/pen/RwQNLNW
-->

<!-- 19. BeanHuang
答案：（可直接撰寫答案）
Codepen：
https://codepen.io/Beanhuang/pen/JjporoV?editors=0011
-->

<!-- 20. Noy
Codepen:
https://codepen.io/MochiCodingPen/pen/NWyPaGv
-->

<!-- 21. IreneLee
Codepen：
https://codepen.io/ntjtcxpt-the-animator/pen/gOvbGML?editors=0012
-->

<!-- 22. Tuhacrt
Codepen:
https://codepen.io/Tuhacrt/pen/oNEgGGX?editors=0010
-->
<!-- 23. 楊竣翔 Vito#7797
https://codepen.io/Vito_Yang/pen/XWZJeov?editors=0012
-->

<!-- 24. kevin嘉軒
https://codepen.io/kevin-chang-the-sasster/pen/oNEgoBw
-->

<!-- 25. Josh Chen#4552
https://codepen.io/hiphop825/pen/xxYbPPq?editors=0010
-->

<!-- 26. hw
Codepen：
https://codepen.io/Lhwei/pen/ExQabXg 
-->

<!-- 27. Pei Ying
Codepen：
https://codepen.io/Pei-Ying/pen/ExQaoYv?editors=1011
-->

<!-- 28. Peng
https://codepen.io/peng-027/pen/eYVmyNv?editors=0010 
-->
<!-- 29. Xiang
https://codepen.io/snorlaxxu/pen/NWyPXaN?editors=0010
-->

<!-- 30. Chaco
https://codepen.io/chaco-wang/pen/xxYbpqj?editors=0011
-->

<!-- 31. Bao
Codepen：
https://codepen.io/baoh/pen/eYVmeXB?editors=0011
-->

<!-- 32. Gimmy#6354
Codepen：
https://codepen.io/TingKan/pen/YzePepy
-->

<!-- 33. Ryan Lu
Codepen：
https://codepen.io/ryanlu1125/pen/eYVmVKX?editors=0011
-->

<!-- 34. 𝔼.𝕎#4742
Codepen：
https://codepen.io/kidult316/pen/dydPmyN
-->

<!-- 35. Lam#0344
Codepen：
https://codepen.io/manshun-lam/pen/Jjpovww
-->

<!-- 36. Patti Chiu  Patti#7774
https://codepen.io/peiru-qiu/pen/QWQwrWb
-->

<!-- 37. Charlotte Lee
https://codepen.io/charlotte-lee/pen/WNMbJXx?editors=0012
-->

<!-- 38. Mylène
https://codepen.io/hamajibashi/pen/oNEgdEJ
-->

<!-- 39. su#7798
https://codepen.io/wc-su/pen/vYdErWK?editors=0010
-->

<!-- 40. lyle#8123
https://codepen.io/tomys/pen/JjpoZrP
-->

<!-- 44. Mojito#6002
codepen: https://codepen.io/vu3xk41997/pen/YzePvRp
-->

<!-- 42. 肥宅長老#6439
https://codepen.io/Pasagi/pen/JjpoBdK?editors=1111
-->

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

<!-- 44. SARZ 札#4102
https://codepen.io/sky93192/pen/eYVmLyG?editors=1111
-->

<!-- 45. JessieCho
Codepen：https://codepen.io/jessieCho/pen/YzePJWX?editors=0010
-->
<!-- 45. han #9437
Codepen：https://codepen.io/qnrxylcw-the-reactor/pen/YzePJVy
-->

<!-- 46. 一隻阿貓#2726
Codepen：https://codepen.io/chenchaoyen/pen/KKQwGPX
-->

<!-- 47. 湯米#7945
Codepen：https://codepen.io/Tommy310/pen/rNJaZbv?editors=0012
-->

<!-- 48. Van.CS#2067
Codepen:https://codepen.io/fbacojji-the-selector/pen/poavxWK?editors=0010 
-->

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

<!-- 50. Feng#1218
codepen : https://codepen.io/Feng_code/pen/KKQwGeB?editors=1111
-->

<!-- 51. Jane Lin
codepen: https://codepen.io/as60160/pen/jOZEeRe 
-->

<!-- 52. 教練#6451
codepen: https://codepen.io/monkeybear721/pen/qBxEJzZ
-->

<!-- 53. JustinLiu
codepen: https://codepen.io/justin0227/pen/xxYbyLo?editors=0010
-->

<!-- 54. Chi
codepen: https://codepen.io/YoChi84/pen/qBxEQRR
-->

<!-- 55. JumpBow#8940
codepen: https://codepen.io/jump-bow/pen/XWZJyKb
-->

<!-- 56. Tim2.0#4742
codepen: https://codepen.io/timji-the-sasster/pen/poavQNm
-->


<!-- 57. Tao Doris #5230
codepen: https://codepen.io/peetaoting/pen/MWQYZYj?editors=0011
-->

<!-- 58. Triple
 Codepen： https://codepen.io/riku30/pen/RwQNeGr -->
 
 <!-- 59. Jason Chen
 Codepen： https://codepen.io/jason60810/pen/PoQwVPz -->
 
 <!-- 60. Stella/UIUX/台北#7394
 Codepen： https://codepen.io/ting-juan-huang/pen/jOZEdLz -->
 
<!-- 70. DoubleZ#2361
 
codepen: https://codepen.io/lazywyatt/pen/WNMbPjX
-->

<!--71 Alphacostankion#8475
codepen: https://codepen.io/alphapolo/pen/QWQwYxr
-->

<!--72 楓之聲
codepen: https://codepen.io/sshane258/pen/rNJaRBX
-->
<!--73 bonnieli1414#4906
codepen: https://codepen.io/bonnieli1414/pen/bGLNZbK
-->

<!--74 _伊凡Evan 
codepen:https://codepen.io/Evan_9837/pen/VwQYReb
-->

<!--75 小不。
codepen: https://codepen.io/SharonWu1987/pen/VwQYRrM
-->

<!--76 ChaoChao
codepen: https://codepen.io/EmiiilyJ/pen/abqzxeQ
-->

<!--77 Easton
codepen: https://codepen.io/EastonIsCodingNow/pen/yLvNyPg
-->

<!--78 Jia-Hong Chen#3863
codepen: https://codepen.io/iloveleon19/pen/WNMvbLo
-->

<!--79 pipi#0852
codepen: https://codepen.io/pipiyy13/pen/ExQjjPO
-->

<!--80
color
codepen:https://codepen.io/color0602/pen/bGLddeq?editors=1111

-->

<!--81 隔壁小王
codepen: https://codepen.io/stevetanus/pen/VwQLLOK
-->

<!-- 82 Murmurline#6969
答案：
```=
function hello(){
  console.log("Hello World");
}
hello();
hello();

function sayHi(name){
  console.log( name +",Hello World");
}
sayHi("Tom");
sayHi("John");

function add(num){
  console.log( num + num);
}
add(2);
add(4);
add(8);

function addTwo(num1, num2){
  console.log( num1 + num2);
}
addTwo(5,10);
addTwo(4,20);
addTwo(9,100);

function addNumberAndString(num1, num2, num3){
  console.log("第一加第二個參數加總為 " + (num1 + num2) + "，第三個參數為 " + num3);
}
addNumberAndString(5,10,30)
addNumberAndString(4,20,22)
addNumberAndString(9,100,44)
```
codepen: https://codepen.io/murmurline/pen/LYQVEKa -->

<!--83 Greta
codepen: https://codepen.io/gretali/pen/eYVNpvY
-->

<!--84 Choo
codepen: https://codepen.io/chooku/pen/oNEXbzy?editors=0011
-->

<!-- 85 SASIMI #5099
codepen:
https://codepen.io/sashimi1327/pen/VwQLeOO
-->

<!-- 86 andersonshen#4675
codepen:
https://codepen.io/luxyenni-the-bold/pen/QWQbNrQ
-->
<!-- 87 Vader_yen維德#6563
codepen:
https://codepen.io/Vaderyen/pen/RwQPaqo?editors=0011
-->

<!-- 87 安安你好你是誰#7416
codepen:
https://codepen.io/leave3310-the-looper/pen/wvyazGV?editors=1010
-->

<!-- 88 Joyce #3790 
codepen:
https://codepen.io/joycehuang/pen/BaYNLje?editors=0011
-->

<!-- 89 Jennyya #7490 
Codepen:
https://codepen.io/nopjb43u7bskq8x/pen/yLvNVxx?editors=0011 
-->

<!-- 90 Allen #6756
codepen:https://codepen.io/knsybndf-the-animator/pen/oNEXZjq -->

<!-- 91 Lian Chen
https://codepen.io/CCL1007/pen/vYdOxzM?editors=0010 -->

<!-- 91 鉦勝#8333
https://codepen.io/atckmax823/pen/wvyadqd?editors=0011 -->

<!-- 92 Arista
https://codepen.io/arista-hsieh/pen/jOZPmma -->


<!-- 93 肉桂卷#0625
https://codepen.io/ginnlee/pen/eYVNRLp?editors=0011 -->

<!-- 94 Lina Chen
https://codepen.io/LinaChen/pen/wvyaqZM
-->

<!-- 95 Stanley#3825
https://codepen.io/sean_1215/pen/QWQbqKg?editors=1011
-->

<!-- 96 Vera#5592
https://codepen.io/skvera/pen/ZErGXWx?editors=0010
-->

<!-- 97 qtrp#5635
https://codepen.io/alicewu1991/pen/dydoVjo?editors=1111
-->

<!-- 98 米金＃1399
https://codepen.io/ihrowjtq-the-vuer/pen/YzeXpjq
-->

<!-- 99 諾拉＃4800
https://codepen.io/Naomi_riayun/pen/GRQJMGN?editors=1111
-->

<!-- 100 101010#8077
https://codepen.io/im1010ioio/pen/yLvNPLG?editors=0012
-->

<!-- 101 bakiii#2652
https://codepen.io/aki168/pen/MWQwOLw?editors=0011
-->

<!-- 102. 白狐
Codepen：https://codepen.io/baihu7851/pen/OJQVOZw
-->

<!-- 103. Cheng#3012
Codepen: https://codepen.io/XiBinCheng/pen/VwQLyrE
-->

<!-- 104. Joseph#1587
Codepen:
https://codepen.io/pierre0703/pen/rNJVvaM
-->

<!-- 105. Vivi#5766
Codepen:
https://codepen.io/hyxfish27/pen/gOvpjLX
-->

<!-- 105. Bumble幫啵#0255
Codepen:
https://codepen.io/lmpzezvw-the-lessful/pen/qBxdJvB
-->

<!-- 106. yuyu#6310
Codepen:
https://codepen.io/yuyu0905/pen/VwQLVXW
-->

<!-- 107. 翁來
Codepen:https://codepen.io/wguo8320/pen/XWZbGrw
-->

<!-- 108. zzuhann #2786
Codepen: https://codepen.io/zzuhann/pen/poaJBNj
-->

<!-- 109. Roceil #5501
Codepen: https://codepen.io/Roceil/pen/wvyaZob?editors=1111
-->

<!-- 110. Lao #4012
Codepen:
https://codepen.io/rao418065/pen/PoQPYOz?editors=1011
-->

<!-- 111. sunny cheng#4113
  https://codepen.io/Sunny0509/pen/QWQjWqJ?editors=1111
   -->
   
<!--112. BeckyYo#1461
 https://codepen.io/bearbecky/pen/YzeyXBy?editors=1111
-->

<!-- 113.Tsuei#9284
https://codepen.io/AlbertoLL/pen/oNEjxEr?editors=0011  
-->

<!-- 114.hsiuhsiu#7412
https://codepen.io/hsiuhsiu/pen/WNMQwoR  
-->

<!-- 115.小不點#1793
https://codepen.io/fwmfmgkx-the-flexboxer/pen/PoQPzNK
-->

<!-- 116.MAO#7720
https://codepen.io/mao0507/pen/RwQWRGp?editors=1010
-->

<!-- 117.Katie
https://codepen.io/Katie24/pen/KKQdvGz?editors=0011
-->

<!-- 118. Yuhung#1391
https://codepen.io/Yu__hung/pen/ExQVQgR?editors=0012
-->

<!-- 119. Abel
https://codepen.io/lun_chi/pen/poajVOy?editors=0011
-->

<!-- 120. Kiwi #9804
https://codepen.io/kiwi1113/pen/zYRvJJz
-->

<!-- 121. will0708#7730
https://codepen.io/ncrdpepc-the-lessful/pen/gOvaBWb?editors=0010
-->

<!-- 122. WilliamChou#7375
https://codepen.io/williampo78/pen/qBxOLaj
-->

<!-- 123. Jie Du
https://codepen.io/qgqonost-the-flexboxer/pen/GRQJwVB?editors=0011
-->

<!-- 124. carrieT#9628
https://codepen.io/echocarriet/pen/mdXVENq
-->

<!--125. Sussu#4211
https://codepen.io/yatiti84/pen/abEeZQQ?editors=1112
-->

<!--126. 靜宜#6866
（可直接撰寫答案）
https://codepen.io/jamie18/pen/oNEbBoj
-->

<!-- 127. karakamin#3416   
Codepen: https://codepen.io/karakamin/pen/BaYjYEL
-->



<!-- 128. RayChen#6088   
https://codepen.io/raychen1996/pen/oNEbqKY
-->
<!-- 129. Chaya#3412   
https://codepen.io/ChiaoJiao/pen/abqdQvX?editors=1111
-->

<!-- 130. Amberhh#2465
https://codepen.io/Amberhh/pen/XWZdrmR?editors=1011
-->

<!-- 131. mei#8421
https://codepen.io/Shila-Chen/pen/rNJeLPb
-->

<!-- 132. YANSzero#5436
codepen:https://codepen.io/yanszero/pen/abqNWXK?editors=0010
-->

<!-- 133. 大薯不加鹽#0614
codepen:https://codepen.io/HeroNeverDie072/pen/vYdGzbd
-->

<!-- 144. BeckyYo#1461
codepen:https://codepen.io/bearbecky/pen/XWZdLXq?editors=1111
-->

<!-- 145. cyndi#8308
codepen:https://codepen.io/swi963/pen/MWQyXWa
-->

<!-- 146. littlesun#9469
codepen:https://codepen.io/littlesun10111/pen/rNJLBxM
-->

<!-- 147. EllieLo#9809
codepen:https://codepen.io/ellie-lo/pen/oNELgVw?editors=0011
-->

<!-- 148. Susan8402#5854
codepen:https://codepen.io/Susan8402/pen/zYRBdEO
-->

<!-- 149. Wilson#8687
codepen:https://codepen.io/foolwilson/pen/poabZKd
-->

<!-- 150. 黑白兔#0684
codepen:https://codepen.io/johnny329/pen/xxYEVqg?editors=1111
-->

<!-- 151. judy0927#4241
codepen:https://codepen.io/judycxc/pen/gOvwqgz
-->

<!-- 152. Chaoci#2460
codepen:https://codepen.io/gmailchao/pen/YzeNqdr?editors=0012
-->

<!-- 153 家洋#6999
codepen:https://codepen.io/yang940648/pen/wvyJeoQ
-->

<!-- 154 rita
codepen:https://codepen.io/rita0916/pen/gOvmBEG?editors=0010
-->

<!-- 154 Zera#6060
codepen : https://codepen.io/zera-tseng/pen/oNEWwRo?editors=0011
-->

<!-- 155 Yu An#1572
codepen : https://codepen.io/yuan0401/pen/LYQyjQB?editors=0012
-->


<!--  Nat#5891
https://codepen.io/dxnqcnen/pen/zYRwbar?editors 
-->

<!-- 157. Mitour#0672
codepen: https://codepen.io/mitour/pen/PoQjppV 
-->

<!-- 158. ewen#8354
codepen: https://codepen.io/ewen0808/pen/OJQgjjq 
-->

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

<!-- 160. 艾芮絲#6060
codepen: https://codepen.io/wangyingju/pen/poaaJqv?editors=0110
-->

<!-- 161. How#5806
codepen: https://codepen.io/howtobefine/pen/ZErrdjK?editors=0010
-->

<!-- 162. Zoey#0839
codepen: https://codepen.io/zoec/pen/NWyBdaB
-->

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

<!-- 164. 眠瀾#8857
CodePen: https://codepen.io/laron9486/pen/eYVKvME
-->

<!-- 165. xuan#0808
codepen:https://codepen.io/xuan0915/pen/LYdLVyR?editors=0011 -->

<!-- 166. Zihur#7755
codepen:https://codepen.io/Zihur/pen/xxWrYog?editors=0010 -->

<!-- 167. anby#7112
codepen:https://codepen.io/andy-ch-bo-an/pen/PoRjRVM?editors=1111 -->

<!-- 168. WangShuan(雅萱)#0947
```javascript=
const sayHi = function (name) {
  return `${name}，Hello world！`;
};

const add = function (num) {
  return  num*num;
};

const addTwo = function (num1, num2) {
  return parseInt(num1) + parseInt(num2)
}
 
const addNumberAndString = function (num1, num2, num3) {
  const total = parseInt(num1) + parseInt(num2);
  return `第一加第二個參數加總為 ${total}，第三個參數為 ${num3}`
}

console.log(sayHi('Tom'))
console.log(add(3))
console.log(addTwo(4,6))
console.log(addNumberAndString(5,10,30))
```
-->
<!-- 167. Ada_Su
codepen:https://codepen.io/zggsoagv-the-scripter/pen/VwXWJwM -->

<!-- 168. Claire#2116
codepen:https://codepen.io/claire-chang-the-bashful/pen/xxWLbaM -->

<!-- 169. React-慧茹(拉拉醬)
codepen:https://codepen.io/lala-lee-jobs/pen/MWVvjZG?editors=0011 -->

<!-- 170. Leone#0851
codepen:https://codepen.io/Leoneboy/pen/NWYvbmO?editors=0011 -->

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

<!-- 172. Yiling#4054
codepen:https://codepen.io/lin010/pen/xxWLgdd -->

<!-- 172. SHIN#6075
codepen:https://codepen.io/shin9626/pen/ZExJeQy -->

<!-- 173.小夜#3809
codepen:https://codepen.io/Naito_K/pen/jOzLBoa?editors=0010 -->

<!-- 174.Yanyan#3555
codepen:https://codepen.io/wei-yi-lee/pen/zYWdzdo -->

<!-- 174.Nyanwu#7129
codepen:https://codepen.io/a07401234/pen/rNdzGVQ -->

<!-- 175.How#5806
codepen:https://codepen.io/howtobefine/pen/OJvxdOW?editors=1111 -->

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

<!-- 177.DaleHsu#0355
codepen:https://codepen.io/dale_hsu/pen/BarJpVr -->

<!-- 178.JOU#6876
 codepen:https://codepen.io/joujoujou924/pen/RwMJQQQ?editors=0010-->
 
 
<!-- 179.Harmonia#3139 
codepen:https://codepen.io/corly74/pen/oNqqaaM?editors=0011

<!-- 180.Sophia19#4005
codepen:https://codepen.io/sophia019/pen/OJZPQEN>

<!-- 181. 小白#2406
codePen: https://codepen.io/gracewhite/pen/rNvdGVd -->
