---
# System prepended metadata

title: "\U0001F3C5 JS 任務 Day8 - 字串再複習"
tags: [軟體工程師體驗營 - 2023]

---

---
tags: 軟體工程師體驗營 - 2023
---

# 🏅 JS 任務 Day8 - 字串再複習

### 題目一：字串輸出
``` =JavaScript
// input 輸入
callString("apple")callString
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)
7. [JavaScript For Loop](https://www.w3schools.com/js/js_loop_for.asp)
8. [JavaScript 的 forEach,filter, find, map 用法](https://www.youtube.com/watch?v=QHduGj2HuFs)
9. [[偷米騎巴哥]操作JS陣列的20種方式](https://www.youtube.com/watch?v=x-P1VxUgYG4)

## 回報流程

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

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


回報區
---

| 報數 |     Discord 名字     |                              Codepen／其他回饋                               |
|:----:|:--------------------:|:----------------------------------------------------------------------------:|
|  1   |      冬天#5215       |              [Codepen](https://codepen.io/winter_/pen/RweQQyq)               |
|  2   |     Rochel#4754      |    [Codepen](https://codepen.io/rochelwang1205/pen/GRYQQGz?editors=0010)     |
|  3   |     Berlin#7338      |       [Codepen](https://codepen.io/3qberlin/pen/qBJxxwK?editors=0010)        |
|  4   |     銀光菇#1692      |           [Codepen](https://codepen.io/genesynthesis/pen/GRYQQYe)            |
|  5   |       翔.#0859       |     [Codepen](https://codepen.io/energy95272z/pen/oNaEqzm?editors=0012)      |
|  6   |   Kulimusoda#2785    |      [Codepen](https://codepen.io/yuch3n_chen/pen/xxyYWgy?editors=0011)      |
|  7   |      Tami#6742       |         [CodePen](https://codepen.io/wqsdqbjn-the-vuer/pen/OJBQvLJ)          |
|  8   | charlottelee849#0366 |        [CodePen](https://codepen.io/char849/pen/bGmLLzN?editors=0012)        |
|  9   |      ABOOS#6276      |       [Codepen](https://codepen.io/guhungyin/pen/xxyYWZJ?editors=0012)       |
|  10  |      ABOOS#6276      |            [Codepen](https://codepen.io/delichaomoon/pen/XWxZEqP)            |
|  11  |    Jacky7035#9423    |              [Codepen](https://codepen.io/adens123/pen/VwEQXNL)              |
|  12  |    andychiou#4830    |           [Codepen](https://codepen.io/andychiou1113/pen/oNaEqGO)            |
|  13  |     Snadra#1987      |              [Codepen](https://codepen.io/mlqmhltg/pen/PoyQRrW)              |
|  14  |      duck#3310       |       [Codepen](https://codepen.io/papy0715/pen/zYmRjqQ?editors=0011)        |
|  15  |    Billy_Ti#9716     |        [Codepen](https://codepen.io/Ti-Show/pen/OJBQZVg?editors=0010)        |
|  16  |     Quantum#6093     |            [Codepen](https://codepen.io/Min-Hao-Hung/pen/ExdQLKB)            |
|  17  |       Nex#2964       |             [Codepen](https://codepen.io/Samuel_D4C/pen/VwErPNp)             |
|  18  | K（アギルダー）#0386 |             [Codepen](https://codepen.io/klay376014/pen/GRYQdvv)             |
|  19  |     jia yu#8896      | [Codepen](https://codepen.io/fjqxaznl-the-reactor/pen/BaqYxpm?editors=0011)  |
|  20  |   しあわせね#0036    |  [Codepen](https://codepen.io/Front-end-engineer/pen/mdzXxNr?editors=1112)   |
|  21  |    alexmav04#5048    |       [Codepen](https://codepen.io/alexmav04/pen/RweQyzx?editors=0012)       |
|  22  |     JimWang#6134     | [Codepen](https://codepen.io/Jim-Wang-the-selector/pen/abRqGxZ?editors=0012) |
|  23  |    Izumi 泉#9691     |             [Codepen](https://codepen.io/kouta-f2e/pen/xxyYjNE)              |
|  24  |      MitA#7407       |            [Codepen](https://codepen.io/qaz15996398/pen/wvYyXaR)             |
|  25  |     ChaosTu#9311     |        [Codepen](https://codepen.io/torotu/pen/JjmpZjE?editors=0012)         |
|  26  |      雲漢#5319       |        [codepen](https://codepen.io/keon981/pen/GRYQdVd?editors=0011)        |
|  27  |     Yui1024#8275     |             [codepen](https://codepen.io/Yuiyuichou/pen/MWPQXba)             |
|  28  |      Judy☻#7874      |       [Codepen](https://codepen.io/hsiaohan/pen/qBJxKxp?editors=1011)        |
|  29  |       kai#1098       |               [Codepen](https://codepen.io/ahkai/pen/MWPQXyw)                |
|  30  |      SKey#9905       |             [Codepen](https://codepen.io/Dale-Chien/pen/WNaMyXe)             |
|  31  |    peihsuan#6315     |            [Codepen](https://codepen.io/peihsuanlai/pen/oNaEMgQ)             |
|  32  |       Uli#1946       |              [Codepen](https://codepen.io/uli1313/pen/wvYyxyo)               |
|  33  |      gahwa#3562      |              [Codepen](https://codepen.io/gahwa17/pen/yLRvqyM)               |
|  34  |      汪汪#4486       |             [Codepen](https://codepen.io/hunwooooof/pen/WNaMzdj)             |
|  35  |    liam9930#4129     | [Codepen](https://codepen.io/jgnjfvvt-the-lessful/pen/abRqRPV?editors=0011)  |
|  36  |    HsuanTang#1349    |             [Codepen](https://codepen.io/HsuanTang/pen/qBJxQZJ)              |
|  37  |      snow#0255       |             [Codepen](https://codepen.io/snow21723/pen/eYPVLQO)              |
|  38  |      泊岸#3466       |      [Codepen](https://codepen.io/qoq77416416/pen/PoyQRqo?editors=1012)      |
|  39  |      Akira#9996      |             [Codepen](https://codepen.io/Akira-Chen/pen/abRqQgx)             |
|  40  |     Eden.C#9359      |               [codepen](https://codepen.io/iseden/pen/RweQqpX)               |
|  41  |     ray0304#2070     |              [Codepen](https://codepen.io/Ray0304/pen/WNaMPMe)               |
|  42  |      兔子#6746       |           [Codepen](https://codepen.io/CarrotDetector/pen/JjmpzoZ)           |
|  43  |       Yuu#5361       |              [Codepen](https://codepen.io/alycehwy/pen/jOeZJLm)              |
|  44  |     jelly77#2088     |      [Codepen](https://codepen.io/Ming-chiang/pen/BaqYMoG?editors=0011)      |
|  45  |     wiimax#4564      |       [Codepen](https://codepen.io/willismax/pen/LYgQajq?editors=0011)       |
|  46  |     Evaxof#1266      |        [Codepen](https://codepen.io/evaxof/pen/MWPQLma?editors=0010)         |
|  47  |     jimhop#6510      |      [Codepen](https://codepen.io/jimsansssss/pen/bGmLzEz?editors=1111)      |
|  48  |     wendyli#2155     |      [Codepen](https://codepen.io/rockayumitw/pen/GRYQeVj?editors=0011)      |
|  49  |     PayRoom#8328     |             [CodePen](https://codepen.io/water38198/pen/eYPVozx)             |
|  50  |   N0c7iluc3n7#4390   |           [Codepen](https://codepen.io/huang-yu-cheng/pen/eYPVodx)           |
|  51  |     jackwu#4437      |           [Codepen](https://codepen.io/jackwu1588003/pen/gOBvyLW)            |
|  52  |      Janet#5784      |      [Codepen](https://codepen.io/janetlinnn/pen/JjmpVzK?editors=1111)       |
|  53  | Jennifer Chuang#3937 |        [Codepen](https://codepen.io/yujhen/pen/eYPVopb?editors=1111)         |
|  54  |     jun777#2468      |      [Codepen](https://codepen.io/js18151102/pen/rNqJbEa?editors=0011)       |
|  55  |     Hanana#9025      |             [Codepen](https://codepen.io/hananalin/pen/NWOymyz)              |
|  56  |      辣椒#1002       |            [Codepen](https://codepen.io/chilichen118/pen/RweQzwd)            |
|  57  |    David0799#4415    |       [Codepen](https://codepen.io/David0799/pen/wvYyLMa?editors=0010)       |
|  58  |   andrew0404#4576    |        [Codepen](https://codepen.io/Loonng/pen/zYmRVLJ?editors=1010)         |
|  59  |      betty#0693      |       [Codepen](https://codepen.io/betty-hu/pen/vYVRBGd?editors=0012)        |
|  60  |     黑白兔#0684      |             [Codepen](https://codepen.io/johnny329/pen/XWxEmqY)              |
|  61  |      yoyo#1003       |            [Codepen](https://codepen.io/pen/XWxEdVN?editors=1111)            |
|  62  |    satarkuo#5736     |       [Codepen](https://codepen.io/SatarKuo/pen/jOeZzyB?editors=0012)        |
|  63  |     chichi#1534      |            [Codepen](https://codepen.io/chichihuang/pen/NWOYrJj)             |
|  64  |   肉個阿倫#7172      |   [Codepen](https://codepen.io/i9574385/pen/oNaqzML)   |
|65|君Jyun#0147|[codepen](https://codepen.io/JyunCodepen/pen/jOezbdG?editors=1111)|
|66|Pinkstar#4993|[codepen](https://codepen.io/gabriel09772/pen/mdzxRYe)|
|67|Eero#1147|[codepen](https://codepen.io/Eero-Chiao/pen/qBJoNXQ?editors=1011)|
|68|姜承#8204|[codepen](https://codepen.io/Troy0718/pen/zYmWdEQ)|
|69|司機叔叔#2463|[codepen](https://codepen.io/bigv5566/pen/xxyWLeZ?editors=1010)|
|70|肉魚#2149|[codepen](https://codepen.io/zoechen13/pen/zYmRQwo)|
|71|homer#1525|[codepen](https://codepen.io/Buckhorn/pen/xxyWLWx)|
|72|Zhong#8917|[codepen](https://codepen.io/klfjrlod-the-sasster/pen/poxLpva)|
|73|Welly#3964|[codepen](https://codepen.io/welly09/pen/MWPVZVz)|
|74|mo#0447|[codepen](https://codepen.io/mozentw/pen/yLRKGvR)|
|75|bonnieli1414#4906|[codepen](https://codepen.io/bonnieli1414/pen/XWxEGOY?editors=1010)|
|76|鉦勝#8333|[codepen](https://codepen.io/atckmax823/pen/wvYmZzd?editors=1011)|
|77|喬喬#2824|[codepen](https://codepen.io/joanne-wei/pen/BaqrgMK)|
|78|PoWei#8484|[codepen](https://codepen.io/harrison-wei-lai/pen/bGmLPLB?editors=1111)|
|79|Bruce-Lee#0629|[codepen](https://codepen.io/xxhdklwi-the-decoder/pen/OJBQGxO)|
| 80 |東東#5015|[CodePen](https://codepen.io/wearymask/pen/WNaJxYG)|
| 81 |狸貓#5863|[CodePen](https://codepen.io/tanuki320/pen/vYVjXVX?editors=0011)|
|82|提姆#9581|[CodePen](https://codepen.io/timouo/pen/OJBvObJ)|
|83|阿榮#8277|[Codepen](https://codepen.io/codeitaday/pen/zYmjPZd?editors=1011)|
|84|冷曄#9378|[Codepen](https://codepen.io/HgHale/pen/BaqxVKr?editors=0011)|
|85|townyuan#2653|[Codepen](https://codepen.io/townyuan/pen/yLRvEZV)|
|86|Jaredlee#5887|[Codepen](https://codepen.io/jared-lee/pen/KKGovox?editors=0011)|
|87|魚翅#3100|[Codepen](https://codepen.io/Fukahire/pen/poxKebw)|
|88|Yvonne#2721|[Codepen](https://codepen.io/Evonne/pen/PoyaJEE?editors=0010)
|89|長方形#9612|[Codepen](https://codepen.io/imjjw/pen/rNqKoOY)
|90|FanJJ#8061|[Codepen](https://codepen.io/yfchenn/pen/KKGeLGJ?editors=0011)
|91|變羊魔法#6372|[Codepen](https://codepen.io/cssf998811/pen/YzJjWMJ)
|92|JasonChang#7847|[Codepen](https://codepen.io/jsonChangJava/pen/bGmjrQB)
|93|ABow_Chen#0800|[Codepen](https://codepen.io/fred39392001/pen/OJBoRbe)
|94|Ling#2765|[Codepen](https://codepen.io/linglingsu/pen/bGmmVWK)
|94|小明#4408|[Codepen](https://codepen.io/ujlylmbv-the-lessful/pen/eYPPRXm)
|94|鄭舜仁#6606|[Codepen](https://codepen.io/randomno/pen/oNaaGpr)
|95|JhouHank#8132|[Codepen](https://codepen.io/JhouHank/pen/RweYpWe)
|96|柚子#3958|[Codepen](https://codepen.io/papy0715/pen/zYmRjqQ?editors=0011)
|97|Tim123#8361|[Codepen](https://codepen.io/Wangtim4/pen/OJBamOy?editors=1112)
|98|羽毛#5463|[Codepen](https://codepen.io/KYuFeather/pen/wvYQYoB)
|99|hello77tw#5984|[Codepen](https://codepen.io/pen/?editors=0011)
|100|alll6z#9204|[Codepen](https://codepen.io/A6Z/pen/jOedzxG)
|101|小魚#8614|[Codepen](https://codepen.io/gizelliang/pen/GRYwoKQ)
|102|Shiloh#8447|[Codepen](https://codepen.io/pkezwtnq-the-encoder/pen/wvYLBgM?editors=0012)
| 103 | Kaya#8857 | [Codepen](https://codepen.io/laron9486/pen/Poxwbbr) |
| 104 | Alan#2423 | [Codepen](https://codepen.io/alan0305/pen/mdQjaPE) |
| 105 | hoyiiiii | [Codepen](https://codepen.io/hoyii/pen/wvVRLjJ?editors=0012) |