---
# System prepended metadata

title: "\U0001F3C5 JS 任務 Day3 - 字串設計"
tags: [軟體工程師體驗營 - 2023]

---

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

# 🏅 JS 任務 Day3 - 字串設計

## 提示
1. [JavaScript 字符串方法](https://www.w3school.com.cn/js/js_string_methods.asp)

### 題目一：字串長度計算

``` =JavaScrip
// input 輸入
checkStringLength("Hello")
checkStringLength("my name is Tom！")

// output 輸出
5
15
```
### 題目二：英文強制小寫
``` =JavaScript
// input 輸入
lowerCase("FOKFF@gmail.com")
lowerCase("gonSakpm@gmail.com")

// output 輸出
"fokff@gmail.com"
"gonsakpm@gmail.com"
```

### 題目三：去除掉段落的左右空白

``` =JavaScript
// input 輸入
trimString("    hi, mom!  ")
trimString(" aa@gmail.com  ")

// output 輸出
"hi, mom!"
"aa@gmail.com"
```

### 題目四：字串依照條件轉陣列
``` =JavaScript
// input 輸入
splitString("black,red,white")
splitString("coffee,tea")

// output 輸出
// ["black","red","white"]
// ["coffee","tea"]
```



### 題目五：切割市區字串
``` =JavaScript
// input 輸入
getArea("高雄市前鎮區一心二路33號");
getArea("高雄市新興區新興路66號");

// output 輸出
"前鎮區"
"新興區"
```


## 回報流程

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

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


回報區
---

| 報數 |     Discord 名字     |                           Codepen／其他回饋                           |
|:----:|:--------------------:|:---------------------------------------------------------------------:|
|  1   |     Rochel#4754      | [codepen](https://codepen.io/rochelwang1205/pen/MWPvdXX?editors=0010) |
|  2   |      DeLi#8324       |      [codepen](https://codepen.io/delichaomoon/details/qBJXGpG)       |
|  3   |   Jerry456789#9029   |    [codepen](https://codepen.io/aria198a/pen/YzJxboW?editors=0010)    |
|  4   |   會飛的兔子#8682    |    [codepen](https://codepen.io/0Naomi0/pen/bGmrPVv?editors=1111)     |
|  5   |    David0799#4415    |          [codepen](https://codepen.io/David0799/pen/dygzBGX)          |
|  6   |     Berlin#7338      |    [codepen](https://codepen.io/3qberlin/pen/oNaerwY?editors=0010)    |
|  7   |      Eero#1147       |   [codepen](https://codepen.io/Eero-Chiao/pen/JjmyQZR?editors=1011)   |
|  8   |     銀光菇#1692      |        [codepen](https://codepen.io/genesynthesis/pen/abRyrXg)        |
|  9   |    司機叔叔#2463     |    [codepen](https://codepen.io/bigv5566/pen/PoyKrya?editors=0010)    |
|  10  |   Kulimusoda#2785    |  [codepen](https://codepen.io/yuch3n_chen/pen/rNqzEBb?editors=0011)   |
|  11  | Jennifer Chuang#3937 |     [codepen](https://codepen.io/yujhen/pen/LYgjKgW?editors=1111)     |
|  12  |    Izumi 泉#9691     |          [codepen](https://codepen.io/kouta-f2e/pen/QWZMXZo)          |
|  13  |      大頭#1695       |    [codepen](https://codepen.io/conlyvrg-the-reactor/pen/GRYvbbB)     |
|  14  |      mumu#9719       |    [codepen](https://codepen.io/mumu_mu/pen/LYgjwEz?editors=0010)     |
|  15  |     yichih#6223      |       [codepen](codepen.io/Ingridchen/pen/oNaeRJg?editors=1011)       |
|  16  |   JasonChang#7847    |        [codepen](https://codepen.io/jsonChangJava/pen/VwEzomx)        |
|  17  |     Pigsue#5981      |    [codepen](https://codepen.io/weixiii/pen/yLRomXO?editors=1111x)    |
|  18  |     Quantum#6093     |        [codepen](https://codepen.io/Min-Hao-Hung/pen/JjmygJM)         |
|  19  |      泊岸#3466       |  [codepen](https://codepen.io/qoq77416416/pen/poxrMGR?editors=0011)   |
|  20  |    Jacky7035#9423    |          [codepen](https://codepen.io/adens123/pen/zYmdggW)           |
|  21  |      Skey#9905       |        [codepen](https://codepen.io/Zih-Ling-Chen/pen/OJBjKWG)        |
|  22  |    CMLB0212#8960     |  [codepen](https://codepen.io/Chungmin0212/pen/WNaEVVG?editors=0010)  |
|  23  |     Eden.C#9359      |           [codepen](https://codepen.io/iseden/pen/zYmdgep)            |
|  24  |      居米#6044       |  [codepen](https://codepen.io/AndyLiu0427/pen/MWPEgpQ?editors=0010)   |
|  25  |      辣椒#1002       |  [codepen](https://codepen.io/chilichen118/pen/jOeGNwL?editors=1111)  |
|  26  |   JimmyHuang#5281    |        [codepen](https://codepen.io/JimmyHuang369/pen/GRYMKMo)        |
|  27  |      兔子#6746       | [codepen](https://codepen.io/CarrotDetector/pen/VwEMZyw?editors=0010) |
|  28  |      啊和#4729       |            [codepen](https://codepen.io/shnny/pen/KKGXPdm)            |
|  29  |     Evaxof#1266      |     [codepen](https://codepen.io/evaxof/pen/XWxerYy?editors=0010)     |
|  30  |       cbs#9007       |           [Codepen](https://codepen.io/wasdjk/pen/BaqwBPW)            |
|  31  |      呵哈#6479       |           [Codepen](https://codepen.io/CHYETI/pen/dygVyNp)            |
|  32  |      冷曄#9378       |     [Codepen](https://codepen.io/HgHale/pen/ZEqXEpZ?editors=1111)     |
|  33  |      肉魚#2149       |          [Codepen](https://codepen.io/zoechen13/pen/RweLwZZ)          |
|  34  |     Snadra#1987      |          [Codepen](https://codepen.io/mlqmhltg/pen/oNaeryZ)           |
|  35  |    肉個阿倫#7172      |       [Codepen](https://codepen.io/i9574385/pen/PoyJoVB)   |
|  36  |    ChaosTu#9311      |       [Codepen](https://codepen.io/torotu/pen/YzJrzvx?editors=0012)   |
|  37  |   Uli#1946     |       [Codepen](https://codepen.io/uli1313/pen/zYmExPz)   |
|  38  |   Akira#9996     |       [Codepen](https://codepen.io/Akira-Chen/pen/rNqGavw?editors=0011)   |
|  39  |   Jarvis莊#8679     |       [Codepen](https://codepen.io/jason-hsuan/pen/wvYrBVK?editors=1011)   |
| 40  |  wiimax#4564  |  [Codepen](https://codepen.io/willismax/pen/XWxebRB?editors=0012)
| 41  |  homer#1525  |  [Codepen](https://codepen.io/Buckhorn/pen/vYVeOpE)
| 42  |  jelly77#2088  |  [Codepen](https://codepen.io/Ming-chiang/pen/QWZqbpv?editors=0011)
| 43  |  liam9930#4129  |  [Codepen](https://codepen.io/jgnjfvvt-the-lessful/pen/PoyJqgp)
| 44 | andychiou#4830 |[Codepen](https://codepen.io/andychiou1113/pen/yLRzYOG)|
| 45 | clairechen#3498 |[Codepen](https://codepen.io/yi-wen-chen/pen/gOBGawx?editors=1010)|
| 46 | K（アギルダー）#0386 |[Codepen](https://codepen.io/klay376014/pen/WNaZQXa)|
|47|PayRoom#8328|[CodePen](https://codepen.io/water38198/pen/VwEMvMp)
| 48 | YHT#1696|[CodePen](https://codepen.io/YHT31/pen/ZEqXbjz)
| 49 | LeeRu#1771|[CodePen](https://codepen.io/IMGameKing/pen/PoyJZYy?editors=1000)
| 50 | 狸貓#5863|[CodePen](https://codepen.io/tanuki320/pen/zYmEvyr?editors=1011)
| 51 | alexmav04#5048 |[CodePen](https://codepen.io/alexmav04/pen/OJBxLKj?editors=0012)
| 52 | jimhop#6510 |[Codepen](https://codepen.io/jimsansssss/pen/RweLroY?editors=1111)
| 53 | vvay#4113 |[Codepen](https://codepen.io/pellmssx-the-sasster/pen/MWPEKEe)
| 54 | jackwu#4437 |[Codepen](https://codepen.io/jackwu1588003/pen/gOBGPWq)
| 55 | ray0304#2070 | [Codepen](https://codepen.io/Ray0304/pen/qBJPbrV) |
| 56 | Dizzi#4952 | [Codepen](https://codepen.io/dizzi_chang/pen/mdzBVVj) |
| 57 | 薇拉#8110 | [Codepen](https://codepen.io/michellecc0522/pen/oNaGbOa?editors=1011) |
| 58 | 翔.#0859 | [Codepen](https://codepen.io/energy95272z/pen/JjmrXRe?editors=0011) |
| 59 | N0c7iluc3n7#4390 | [Codepen](https://codepen.io/huang-yu-cheng/pen/PoyJNeG) |
| 60 | Yuu#5361 | [Codepen](https://codepen.io/alycehwy/pen/VwEMaxw) |
| 61 | kai#1098 | [Codepen](https://codepen.io/ahkai/pen/rNqGOgx) |
| 62 | しあわせね#0036 | [Codepen](https://codepen.io/Front-end-engineer/pen/KKGXMvb?editors=1111) |
| 63 | 冬天#5215 | [Codepen](https://codepen.io/winter_/pen/xxyXdwJ) |
| 64 | chichi#1534 | [Codepen](https://codepen.io/chichihuang/pen/Exdwmwd) |
| 65 | Judy #7874 | [Codepen](https://codepen.io/hsiaohan/pen/yLRzXYR?editors=1011)|
| 66 | Lychee KK | [Codepen](https://codepen.io/kakakala/pen/BaqwRxQ?editors=1111)
| 67 | 大昌#6691 | [Codepen](https://codepen.io/jswei014/pen/zYmEzaG)
| 68 | charlottelee849#0366 | [Codepen](https://codepen.io/char849/pen/MWPEord?editors=1012)
| 69 |peihsuan#6315|[Codepen](https://codepen.io/peihsuanlai/pen/NWOagbM)|
| 70 |Bruce-Lee#0629|[Codepen](https://codepen.io/xxhdklwi-the-decoder/pen/ExdwvKZ?editors=0011)|
| 71 |duck#3310|[Codepen](https://codepen.io/papy0715/pen/VwEMzpX?editors=)|
| 72 |jia yu#8896|[Codepen](https://codepen.io/fjqxaznl-the-reactor/pen/yLRzodM?editors=0010)|
|73|阿榮#8277|[Codepen](https://codepen.io/codeitaday/pen/OJBxjqL)|
|74|yoyo#1003|[Codepen](https://codepen.io/pen/wvYrqLa?editors=1111)|
|75|黑白兔#0684|[Codepen](https://codepen.io/johnny329/pen/gOBGGOY)|
|76|bonnieli1414#4906|[Codepen](https://codepen.io/bonnieli1414/pen/vYVeeGq?editors=0012)|
|77|satarkuo#5736|[Codepen](https://codepen.io/SatarKuo/pen/LYgzzpX)|
| 78 |grayyyy#1014|[Codepen](https://codepen.io/jhye0222/pen/YzJrQBr)|
| 79 |Hanana#9025|[Codepen](https://codepen.io/hananalin/pen/NWOaarR)|
| 80 |sosla#9673|[Codepen](https://codepen.io/Sosla-Ting/pen/zYmEEBj)|
| 81 |鉦勝#8333|[Codepen](https://codepen.io/atckmax823/pen/LYgzzmo?editors=0011)|
| 82 |penny#6214|[Codepen](https://codepen.io/penny8989/pen/BaqwwER?editors=0011)|
| 83 |135144365#3152|[Codepen](https://codepen.io/Heng902/pen/jOeGaGe?editors=1111)|
| 84 |Welly#3964|[Codepen](https://codepen.io/welly09/pen/MWPErmK)|
|85|汪汪#4486|[Codepen](https://codepen.io/hunwooooof/pen/RweLjVp)|
|86|提姆#9581|[Codepen](https://codepen.io/timouo/pen/RweLydv)|
| 87 | yun #6943 |[Codepen](https://codepen.io/Loraine-Yan/pen/poxWLVY)|
| 88 | Jaredlee#5887 |[Codepen](https://codepen.io/jared-lee/pen/wvYrEGN?editors=0011)|
| 89 | Janet#5784 |[Codepen](https://codepen.io/janetlinnn/pen/mdzBGGa?editors=1011)|
| 90 | HsuanTang#1349 |[Codepen](https://codepen.io/HsuanTang/pen/zYmEmRJ)|
| 91 | Ying Ying Liu #0836 |[Codepen](https://codepen.io/yingyliu/pen/NWOamgV?editors=0011)|
| 92 | Tami#6742 | [CodePen](https://codepen.io/wqsdqbjn-the-vuer/pen/xxyXLOd) |
| 93 | 魚翅#3100 | [CodePen](https://codepen.io/Fukahire/pen/wvYPBrO) |
| 94 | 羽毛#5463 | [CodePen](https://codepen.io/KYuFeather/pen/LYgOVEB) |
| 95 | JhouHank#8132 | [CodePen](https://codepen.io/JhouHank/pen/yLRPyRO) |
|96|君Jyun#0147|[codepen](https://codepen.io/JyunCodepen/pen/NWOwKLp?editors=1111)|
|97|JimWang#6134|[codepen](https://codepen.io/Jim-Wang-the-selector/pen/oNaoXMR?editors=1111)|
|98|長方形#9612|[codepen](https://codepen.io/imjjw/pen/XWxzWyW)|
|99|LeoSong1116#9861|[codepen](https://codepen.io/leosong1116/pen/VwErvme?editors=1010)|
|100|雲漢#5319|[codepen](https://codepen.io/keon981/pen/bGmYVoL?editors=0011)
|101|東東#5015|[codepen](https://codepen.io/wearymask/pen/ExdwwYE)
|102|Emily4869#1257|[codepen](https://codepen.io/aptx4869Emily/pen/WNaXGvP)
|103|姜承#8204|[codepen](https://codepen.io/Troy0718/pen/BaqmLXX)
|104|jun777#2468|[codepen](https://codepen.io/js18151102/pen/rNqYjNq?editors=0011)
|105|wendyli#2155|[codepen](https://codepen.io/pen/?editors=0011)
|106|andrew0404#4576|[codepen](https://codepen.io/Loonng/pen/oNaowpb?editors=0010)
|107| endau66#2102 | [Codepen](https://codepen.io/endau66/pen/xxyPrMw)
|108| 小明#4408 | [Codepen](https://codepen.io/ujlylmbv-the-lessful/pen/abRVKWY)
|109| 貢波波夫#3056 | [Codepen](https://codepen.io/mxgrfgcr-the-bashful/pen/RwejEeB)
|110| 柚子#3958 | [Codepen](https://codepen.io/as6625998/pen/abRVMPb?editors=1011)
|111| 變羊魔法#6372 | [Codepen](https://codepen.io/cssf998811/pen/LYgOKJp)
|112| PoWei#8484 | [Codepen](https://codepen.io/harrison-wei-lai/pen/ExdoYXo?editors=1011)
|113| 安安#4782 | [Codepen](https://codepen.io/ratsai/pen/MWPrYRK?editors=1111)
|114| Yui1024#8275 | [Codepen](https://codepen.io/Yuiyuichou/pen/jOeYMyd)
|115| MitA#4707 | [Codepen](https://codepen.io/qaz15996398/pen/JjmMbma)
|115| 鄭舜仁#6606 | [Codepen](https://codepen.io/randomno/pen/xxypgEB)
|116| ABow_Chen#0800 | [Codepen](https://codepen.io/fred39392001/pen/LYgeLpv)
|117| Pinkstar#4993 | [Codepen](https://codepen.io/gabriel09772/pen/NWOXvxB)
|118| edie599916#7112 | [Codepen](https://codepen.io/Chen-CiCi/pen/QWZaqZK)
|119|ABOOS#6276|[Codepen](https://codepen.io/guhungyin/pen/BaqJYmB?editors=0012)|
|120|lililala#4020|[Codepen](https://codepen.io/gnituyccc/pen/JjmONra)|
|121|一瑋#8459|[CodePen](https://codepen.io/zerosula/pen/LYgeMdx)|
|122|不要迷戀媽的奶#0295|[CodePen](https://codepen.io/kewdjbwp-the-typescripter/pen/PoyEXry?editors=0011)|
|123|Winnie#2737|[CodePen](https://codepen.io/WinnieHuang/pen/vYVpboq?editors=0111)|
|124|chicken38#1539|[CodePen](https://codepen.io/chickenag/pen/qBJpzqv)|
|125|Zhong#8917|[CodePen](https://codepen.io/klfjrlod-the-sasster/pen/BaqJXRr)|
|126|啊真真#8940|[CodePen](https://codepen.io/fctamuvf-the-vuer/pen/LYgQPjd?editors=1111)|
|127|郭芙蘭#6374|[CodePen](https://codepen.io/flora_Kuo/pen/XWxZbmj?editors=0011)|
|128|沒所謂#5902|[CodePen](https://codepen.io/euazlgul-the-decoder/pen/abRqmYd)|
|129|Ling#2765|[CodePen](https://codepen.io/linglingsu/pen/yLRvMYR)|
|130|betty#0693|[CodePen](https://codepen.io/betty-hu/pen/oNaEGyy?editors=0012)|
|131|Alice Su#4613|[CodePen](https://codepen.io/alice0401/pen/ZEqrqEY)|
|132|ruby0316#3380|[CodePen](https://codepen.io/rena6211zera/pen/MWPQzvO)|
|133|Billy_Ti#9716|[CodePen](https://codepen.io/Ti-Show/pen/RweQEXx?editors=0011)|
|134|勁霖#1602|[CodePen](https://codepen.io/nickwu1229/pen/PoyQLLG)|
|135|leo.yujie#8280|[CodePen](https://codepen.io/peihsin-the-scripter/pen/abRYdLo)|
|136|喬喬#2824|[CodePen](https://codepen.io/joanne-wei/pen/RweMoPx)|
|137|ssshane#0673|[CodePen](https://codepen.io/sam6091260/pen/eYPMgNR?editors=1111)|
|138|Neal#7428|[CodePen](https://codepen.io/thinkingsmonkey/pen/rNqdWoj?editors=0011)|
|139|Yvonne#2721|[CodePen](https://codepen.io/Evonne/pen/MWPGYvB?editors=0010)|
|140|Mylène#2481|[CodePen](https://codepen.io/hamajibashi/pen/abRYqKW)|
|141|Ataraxia#9977|[CodePen](https://codepen.io/ataraxia8888/pen/qBJPWag)|
|142|townyuan#2653|[CodePen](https://codepen.io/townyuan/pen/rNqKxbP)|
|143|Callmelulu#2290|[CodePen](https://codepen.io/callmelulu/pen/OJBENzv)|
|143|Elena Lin #3392|[CodePen](https://codepen.io/elenalin119/pen/qBJKabQ?editors=1111)|
|144|Jenny真#7532 | [CodePen](https://codepen.io/wei-chen-wu/pen/wvYXJgW?editors=1111) |
|145|FanJJ#8061 | [CodePen](https://codepen.io/yfchenn/pen/PoyaOWX?editors=0011) |
|146|Hsiu#8767 | [CodePen](https://codepen.io/amy-hsiu/pen/KKGeEEz?editors=0010) |
|147|Sabrina#3073 | [CodePen](https://codepen.io/SabrinaGuo/pen/LYgBOWL?editors=0011) |
|148|SharonLin#0915 | [CodePen](https://codepen.io/sharonlin1001/pen/NWOBeZp) |
|149|科科#5463 | [CodePen](https://codepen.io/ilove941120/pen/WNagbdw?editors=1112) |
|150|Lainie#1931 | [CodePen](https://codepen.io/Lainie88/pen/bGmxWor) |
|151|鹿熙 Lucy#7187 | [CodePen](https://codepen.io/JingHuei/pen/GRYXzoJ?editors=1010) |
|152|alan0305#2423 | [CodePen](https://codepen.io/alan0305/pen/NWOLZaO) |
|153|remk97#2022 | [CodePen](https://codepen.io/remk97/pen/dygqxPJ) |
|154|Yihwei#2027 | [CodePen](https://codepen.io/auntebur-the-sans/pen/mdzzJjP?editors=0111) |
|155|小魚＃8614 | [CodePen](https://codepen.io/gizelliang/pen/abRagzo) |
|156|cherylxie#5898 | [CodePen](https://codepen.io/cherylxie912/pen/ZEqqPrN?editors=0012) |
|157|QOO#8446 | [CodePen](https://codepen.io/QOOQOOQ/pen/oNaPoNL?editors=0012) |
|158|Tim123#8361 | [CodePen](https://codepen.io/Wangtim4/pen/MWPzJoz?editors=0012) |
|160| FiReBrO#0557 | [CodePen](https://codepen.io/firebro42/pen/GRYwdvG) |
|161| lin_lion#7502 | [CodePen](https://codepen.io/Lion-Lin/pen/abRQabd) |
|162| Ann Chou#0146 | [CodePen](https://codepen.io/annchou_illu/pen/wvYRgLy) |
|162| Shiloh#8447 | [CodePen](https://codepen.io/pkezwtnq-the-encoder/pen/qBJLraa?editors=0012) |
|163| hello77tw#5984 | [CodePen](https://codepen.io/luyoyo/pen/JjmwJPw?editors=0011) |
|164| alll6z#9204 | [CodePen](https://codepen.io/A6Z/pen/ExdGXZG) |
|165| 浪裡小白龍#6860 | [CodePen](https://codepen.io/art-jg/pen/zYmyNQg?editors=0011) |
|166| Syrena#3897 | [Codepen](https://codepen.io/Syrena-Chung/pen/LYgqbqJ?editors=0010)|
| 167 | Kaya#8857 | [Codepen](https://codepen.io/laron9486/pen/BaGyywq) |
| 168 | NathanJames#8120 | [Codepen](https://codepen.io/ufo060204/pen/dyQPWvq) |
| 169 | weiting#3489 | [Codepen](https://codepen.io/weiting14/pen/QWJyqNJ?editors=0011) |
|170|Tina02#2691|[Codepen](https://codepen.io/chjitlox-the-bashful/pen/mdQPeXo)|
|171|hoyiiiii|[Codepen](https://codepen.io/hoyii/pen/LYwMyLm?editors=0011)|