---
# System prepended metadata

title: "\U0001F3C5 5/12(四) 每日 JS 刷題任務 - 字串再複習"
tags: [公益程式體驗營 - 2022]

---

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

# 🏅 5/12(四) 每日 JS 刷題任務 - 字串再複習
### 題目一：字串輸出
``` =JavaScript
// input 輸入
callString("apple")
callString("banner")
callString("qqq")

// output 輸出
"a-p-p-l-e"
"b-a-n-a-n-a"
"q-q-q"
```
### 題目二：字串數量
* 若大於五個字元，請只顯示前兩個字
``` =JavaScript
// input 輸入
checkFiveWord("hello")
checkFiveWord("hi~")
checkFiveWord("Jackson")

// output 輸出
"he"
"hi~"
"Ja"
```

### 題目三：函式強制正整數相乘

``` =JavaScript
// input 輸入 
multiply(2,3)
multiply(1,3,5)
multiply(7,7,7,7,7)
multiply(5,3,-2)
multiply(4)
// output 輸出
6
15
16807
30
4
```


### 題目四：
之後老師將會出有關 **for 迴圈，與陣列操作(forEach、map、sort)的題目**，還請同學在此分享免費學習資源，文章與影片皆可

1. [MDN：Loops and iteration](https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Guide/Loops_and_iteration)
2. [學員 for 迴圈筆記](https://hackmd.io/@wywsmail/SJjkvWA2H)
3. [陣列 forEach](https://www.youtube.com/watch?v=_vFuDQ_6Xt8)
4. [for 迴圈介紹](https://youtu.be/sTkjk84SIP0)
5. [陣列 sort](https://youtu.be/3ohTzWhLua8)
6. [卡斯伯老師的陣列教學 (超推!!!)](https://www.casper.tw/javascript/2017/06/29/es6-native-array/#Array-prototype-every)

## 回報流程

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/RwQrNKM?editors=0012
-->

<!-- 2. Wendy
答案：（可直接撰寫答案）
Codepen：https://codepen.io/wendy03/pen/ExQPgdm
-->

<!-- 3. su#7798
codepen: https://codepen.io/wc-su/pen/VwQKZVB
-->

<!-- 4.pipi
codepen:https://codepen.io/pipiyy13/pen/ExQjjPO
-->

<!-- 5. Lina Chen
codepen:https://codepen.io/LinaChen/pen/MWQjWWp
-->

<!-- 6. Aaron
codepen :https://codepen.io/narrowd4c/pen/GRQJoJP?editors=0011
-->

<!-- 7. yunyun
codepen :https://codepen.io/yun_yunni/pen/gOvwORO
-->

<!-- 8. Chi
Codepen: https://codepen.io/YoChi84/pen/XWZjWwx 
-->

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

<!-- 10. yuyu#6310
Codepen: https://codepen.io/yuyu0905/pen/ExQgajM?editors=0012
-->

<!-- 11. bakiii#2652 (試用提示以外方法解)
  https://codepen.io/aki168/pen/poaEvjV-->
  
<!-- 12. Xiang#5313
Codepen: https://codepen.io/snorlaxxu/pen/PoQGwWm?editors=0010
-->

<!-- 13. Leo Song
Codepen:
https://codepen.io/sunnylaba/pen/wvyzvLJ?editors=0011
-->

<!-- 14. Alphacostankion #8475
Codepen:
https://codepen.io/alphapolo/pen/yLvayJq
-->

<!-- 15. Knn#0492
Codepen:
https://codepen.io/Knn_84/pen/LYQRZxg?editors=0010
-->

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

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

<!-- 18. Murmurline#6969
Codepen：https://codepen.io/murmurline/pen/eYVddQw
-->

<!-- 19. Katie
Codepen：https://codepen.io/Katie24/pen/yLvJKPP
-->

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

<!-- 20. stanley#3825
Codepen：https://codepen.io/sean_1215/pen/RwQGVgM?editors=1111
-->

<!-- 21. EllieLo#9809
Codepen：https://codepen.io/ellie-lo/pen/bGLwpXG?editors=0011
-->

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

<!-- 23. WeiKai#1867
Codepen: https://codepen.io/beginneraboutlife116/pen/poabZxp
-->

<!-- 24. KuoMin#4931
Codepen: https://codepen.io/KuoMin/pen/zYRKwdK
-->

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

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

<!-- 26. bonnieli1414#4906
Codepen: https://codepen.io/bonnieli1414/pen/jOZMzWq?editors=0011
-->

<!-- 26. Raymond Lam#0344
Codepen: https://codepen.io/manshun-lam/pen/rNJMOdd
-->

<!-- 27. hsiuhsiu
Codepen: https://codepen.io/hsiuhsiu/pen/QWQKJxG?editors=0011
-->

<!-- 28. 楓之聲#6945
Codepen: https://codepen.io/sshane258/pen/abqmPdX  
-->

<!-- 29. Easton#3863
codepen: https://codepen.io/EastonIsCodingNow/pen/ZErpVam?editors=1111
-->

<!-- 30. Yuhung#1391
codepen: https://codepen.io/Yu__hung/pen/MWQjwRj
-->

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

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

<!-- 33. RyanLu#3642
codepen: https://codepen.io/ryanlu1125/pen/rNJMRGG?editors=0012
-->

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

<!-- 35. JustinLiu
Codepen: https://codepen.io/justin0227/pen/mdXrgxO?editors=0010
-->

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

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

<!-- 38.小不點#1793
Codepen:https://codepen.io/fwmfmgkx-the-flexboxer/pen/jOZMgJv?editors=1112
-->

<!-- 39.Pearlie#3536
Codepen:https://codepen.io/PPcode/pen/MWQbevp
-->

<!-- 40.Arista
Codepen:https://codepen.io/arista-hsieh/pen/QWQGgVK
-->

<!-- 50. WilliamChou#7375
Codepen:https://codepen.io/williampo78/pen/JjpbxXY
-->


<!-- 50. Sussu#4211
Codepen:https://codepen.io/yatiti84/pen/yLvVrYz?editors=0011
-->

<!-- 51. 隔壁小王
Codepen:
https://codepen.io/stevetanus/pen/poaNByr
-->

<!-- 52. Wilson#8687
Codepen: https://codepen.io/foolwilson/pen/zYRoXRy
-->

<!-- 53. Chaco#2993
Codepen: https://codepen.io/chaco-wang/pen/QWQGXZN?editors=0011
-->

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



<!-- 55. RayChen#6088
Codepen: https://codepen.io/raychen1996/pen/RwQKLMZ
-->

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

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

<!-- 58. Mojito#6002
 codepen: https://codepen.io/vu3xk41997/pen/dydvJwE
-->

<!-- 59.Vito#7797
https://codepen.io/Vito_Yang/pen/XWZRVmp?editors=0012
-->

<!-- 60.ChaoChao
https://codepen.io/EmiiilyJ/pen/NWyjzJy
-->

<!-- 61.Mitour#0672
 codepen: https://codepen.io/mitour/pen/abqydXL-->
 
<!-- 62.小金#3256
codepen: https://codepen.io/AmoGH357/pen/XWZPppG
-->

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

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

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

<!-- 66. xun#0808 
codepen：https://codepen.io/xuan0915/pen/BarwmQV?editors=0011-->

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


<!-- 67: EvaLin#4546
codepen:https://codepen.io/evalin0316/pen/mdxXWeB?editors=1111 -->

<!-- 68: Neuf#3083 
codepen: https://codepen.io/yifanneuf/pen/poLXKdY?editors=0010-->

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



